org.apache.jasper.JasperException: An exception occurred processing JSP page /User/login.jsp at line

  1. 9:   </head>  
  2. 10:     
  3. 11:   <body>  
  4. 12:     <s:form action="login" method="post">  
  5. 13:         <s:textfield label="username" name="name"/>  
  6. 14:         <s:password label="password" name="age"/>  
  7. 15:         <s:submit value="submit"/>  
  8.   
  9.   
  10. Stacktrace:  
  11.     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)  
  12.     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)  
  13.     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)  
  14.     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)  
  15.     javax.servlet.http.HttpServlet.service(HttpServlet.java:717)  
  16.   
  17.   
  18. root cause   

原因是   web.xml文件中  

  1. <filter-mapping>  
  2.     <filter-name>struts2</filter-name>  
  3.     <url-pattern>/*</url-pattern>  
  4. </filter-mapping>  

的 <url-pattern>/*</url-pattern>  的  url-pattern 改为了 *.action ,这把所有的除了*.action之外的文件全部 过滤掉了 。

posted @ 2013-03-31 12:07  残星  阅读(3461)  评论(0编辑  收藏  举报