在线等!帮忙看看我的代码出错在那里?The left-hand side of an assignment must be a variable

<%@pagecontentType="text/html;charset=gb2312"%><%@includefile="incoming/common.jsp"%>... <%@page contentType="text/html;charset=gb2312"%>
<%@ include file="incoming/common.jsp"%>
<%@ include file="incoming/connectdb.jsp"%>
<%
String name =(String)session.getAttribute("name");
session.setAttribute("name",name);
String errmsg = request.getParameter("errmsg");
request.getSession(true);
String chk = "false";
session.putValue("Enter",chk);
%>
<body>
<form name="form1" method="post" action="chkchmsp.jsp" id = "page">
<table width="60%" height="112" border="1" align="center" cellpadding="1" cellspacing="1" class="body">
<tr>
<td width="26%" height="25" align="center" class="body">教师姓名 </td>
<td width="74%">    
<%=name%>
 </td>
</tr>
<tr>
<td width="26%" height="22" align="center" class="body">旧密码</td>
<td width="74%">    
<input type="password" name="oldpassword" size="15"></td>
</tr>
<tr>
<td width="26%" height="22" align="center" class="body">新密码</td>
<td width="74%">    
<input type="password" name="newpassword" size="15"></td>
</tr>
<tr>
<td width="26%" height="22" align="center" class="body">确认密码</td>
<td width="74%">    
<input type="password" name="newpassword2" size="15"></td>
</tr>
<tr align="center">
<td height="36" colspan="2" align="center"><input type="submit" name="Submit" value="提交" onClick="javascript:return(checkform());">
   
<input type="reset" name="reset" value="清空"></td></tr>
<tr><td width="100%"><div align="left"><font size="2" color="#CC3333">
</font> </div></td></tr>
</table>
</form>
第二页代码是
<%@page contentType="text/html;charset=gb2312"%>
<%@ include file="incoming/common.jsp"%>
<%@ include file="incoming/connectdb.jsp"%>
<%
String username =(String)session.getAttribute("name");
String newpassword = request.getParameter("newpassword");
String oldpassword = request.getParameter("oldpassword");
sql = "SELECT * FROM userpassword WHERE username='"+username+"' AND password='"+oldpassword+"'";

rs = smt.executeQuery(sql);
if (!rs.next())
{
String errmsg="error1";
response.sendRedirect("changeusermsg.jsp?errmsg="+errmsg);
return;
}

request.getSession(true);
String chk="true";
session.putValue("Enter",chk);
session.setAttribute("username",username);
session.setAttribute("newpassword",newpassword);
response.sendRedirect("querymsg.jsp");
%>
抛出异常为:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 4 in the jsp file: /jsrz/chkchmsp.jsp
The left-hand side of an assignment must be a variable
3: <%@ include file="incoming/connectdb.jsp"%>
4: <%
5: ResultSet _rs;

An error occurred at line: 4 in the jsp file: /jsrz/chkchmsp.jsp
Syntax error on token "Invalid Character", invalid AssignmentOperator
3: <%@ include file="incoming/connectdb.jsp"%>
4: <%
5: ResultSet _rs=null;

赋值了,还是不行!
展开
 我来答
东方剑圣
2008-08-25 · TA获得超过506个赞
知道小有建树答主
回答量:648
采纳率:0%
帮助的人:302万
展开全部
兄弟,你是不是有的字符是中文格式下的,目前你的问题不再是以前的问题了,抛出的异常变了
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式