equal symbol expected 运行jsp时出现这个错误提示怎么解决?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了equal symbol expected 运行jsp时出现这个错误提示怎么解决?相关的知识,希望对你有一定的参考价值。
<%@ page contentType="text/html; charset=GB2312" language="java" import="java.sql.*" errorPage=""%>
<%@ page import="cn.ac.ict.UserConn" %>
<html>
<head>
<title>checklogin page</title>
</head>
<body>
<jsp:useBean id="userlog" class="cn.ac.ict.UserConn" scope="session"/>
<jsp:include page="conn.jsp"></jsp:include>
<jsp:setProperty name="userlog" property="id"/>
<jsp:setProperty name="userlog" property="username"/>
<jsp:setProperty name="userlog" property="usertype"/>
<!--<jsp:setProperty name="userlog" property="password/>-->
<%
String lname;
int lpwd=0;
int tpwd=0;
String lid;
String usertype;
String sql;
lname=request.getParameter("lname");
usertype=request.getParameter("usertype");
lid=request.getParameter("lid");
if(usertype.equals("student"))
sql="select * from student where sname='"+lname+"'";
else if(usertype.equals("teacher"))
sql="select * from teacher where tname='"+lname+"'";
else
sql="select * from admin where adname='"+lname+"'";
ResultSet rs=userlog.query(sql);
int rowcount=0;
while(rs.next())
rowcount++;
if(usertype.equals("student"))
lid=rs.getString("snum");
lname=rs.getString("sname");
tpwd=rs.getInt("spasswd");
else if(usertype.equals("teacher"))
lid=rs.getString("tnum");
lname=rs.getString("tname");
tpwd=rs.getInt("tpasswd");
else
lid=rs.getString("anum");
lname=rs.getString("adname");
tpwd=rs.getInt("apasswd");
if((rowcount==1)&&(tpwd==lpwd))
if(usertype.equals("student"))
session.setAttribute("id",lid);
session.setAttribute("username",lname);
session.setAttribute("usertype","student");
response.sendRedirect("stutoppage.jsp");
else if(usertype.equals("teacher"))
session.setAttribute("id",lid);
session.setAttribute("username",lname);
session.setAttribute("usertype","teacher");
response.sendRedirect("teatoppage.jsp");
else if(usertype.equals("admin"))
session.setAttribute("id",lid);
session.setAttribute("username",lname);
session.setAttribute("usertype","admin");
response.sendRedirect("adtoppage.jsp");
else
out.println("登录失败,请重新<a href=\"top.jsp\" target=\"_top\">登录</a>");
%>
</body>
</html>
提示出错org.apache.jasper.JasperException: /checklogin.jsp(39,33) equal symbol expected
请问哪位高手能指点指点
以上是关于equal symbol expected 运行jsp时出现这个错误提示怎么解决?的主要内容,如果未能解决你的问题,请参考以下文章
jsp jstl quote symbol expected
HTTP Status 500 - /WEB-INF/pages/backend/userlist.jsp (line: 100, column: 20) quote symbol expected
Oracle游标,在判断时报PLS-00103:Encountered the symbol "=" when expecting one of the following