在Struts和hibernate上部署Web应用程序时遇到错误。
我得到的堆栈跟踪是:> org.apache.jasper.JasperException: An exception occurred processing
> JSP page /index.jsp at line 23 20: <body> 21: 22: <h1>Contact
> Manager</h1> 23: <s:actionerror xmlns:s="#unknown" /> 24: 25: <s:form
> action="add" method="post" xmlns:s="#unknown"> 26: <s:textfield
> name="contact.firstName" label="Firstname" />
>
> Stacktrace:
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> root cause The Struts dispatcher cannot be found. This is usually
> caused by using Struts tags without the associated filter. Struts tags
> are only usable when the request has passed through its servlet
> filter, which initializes the Struts dispatcher needed for this tag. -
> [unknown location]
> org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
> org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
> org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
> org.apache.jsp.index_jsp._jspx_meth_s_005factionerror_005f0(index_jsp.java:185)
> org.apache.jsp.index_jsp._jspService(index_jsp.java:94)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> note The full stack trace of the root cause is available in the Apache
> Tomcat/6.0.13 logs.
>
> My web.xml file is :--
>
> <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5"
> xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> <welcome-file-list>
> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <filter> <filter-name>struts2</filter-name> <filter-class>
> org.apache.struts2.dispatcher.FilterDispatcher </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name>
> <url-pattern>*.action</url-pattern> </filter-mapping></web-app>
我如何提供代码页,因为它在更新同一帖子时会出错。