9: </head>
10:
11: <body>
12: <s:form action="login" method="post">
13: <s:textfield label="username" name="name"/>
14: <s:password label="password" name="age"/>
15: <s:submit value="submit"/>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
原因是 web.xml文件中
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
的 <url-pattern>/*</url-pattern> 的 url-pattern 改为了 *.action ,这把所有的除了*.action之外的文件全部 过滤掉了 。