用DAO模式struts+hibernate做的一个用户登陆 结果出了这个500错误
HTTP Status 500 -
--------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /login.jsp:28
25: </logic:equal>
26: </logic:present>
27: <br>
28: <html:form action="login.do" method="post">
29: 用户ID:<html:text property="id"/><br>
30: 密 码:<html:password property="password"/><br>
31: <input type="hidden" name="status" value="login">
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: Cannot retrieve mapping for action /login
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
org.apache.jsp.login_jsp._jspService(login_jsp.java:90)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /login
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:753)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
org.apache.jsp.login_jsp._jspx_meth_html_form_0(login_jsp.java:272)
org.apache.jsp.login_jsp._jspx_meth_html_html_0(login_jsp.java:129)
org.apache.jsp.login_jsp._jspService(login_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
--------------------------------------------
Apache Tomcat/5.5.20
------解决方案--------------------
写的很清楚了.
Cannot retrieve mapping for action /login
可能原因:action没有再struts-config.xml 中定义,或没有找到匹配的action,例如在JSP文件中使用 处理:如果出现上述异常,请查看struts-config.xml中的定义部分,有时可能是打错了字符或者是某些不符合规则,可以使用struts console工具来检查。
代码迷推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.daimami.com/search?q=317