我的Java怎么不能编译啊!!!请高手指教!!!

来源:百度知道 编辑:UC知道 时间:2024/09/23 05:47:53
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 13 in the jsp file: /login.jsp
Generated servlet error:
D:\Java\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\login_jsp.java:57: 非法的表达式开始
=Name
^
以上是我在做JSP的时候遇到的问题,请高手来指点一下!!!
以下是我的login.jsp的内容
<% String Name=request.getParameter("rdname");
String Passwd=request.getParameter("rdpw");
if (Name.equels("")||Passwd.equels(""))
response.sendRedirect("login.html");
%>
<html>
<body>

<center>
<font size="5" face="隶书" color="#ff0000">登陆成功</font>

</center><hr><P>
姓名是:<% =Name %><P>
密码是:<% =Passwd %>
</body>
</html>

1.Name.equels 改成: Name.equals

2.:<% =Name %> 改成: <%=Name%> 不能有空格..

Passwd 类似..

看下Tomcat日志错误

你的程序有问题

把你 login.jsp 的代码帖出来

貌似是判断name的时候少写了个"=",
不过写成了"=="也不合适,写个equal吧