我有一个servlet,它将我们带到一个现有的jsp,比如“home.jsp”。这是由许多jspf片段组成的。所以结构就像
Home.jsp
包括
jsp1、jsp2等等。
现在,我们已经将部分模块迁移到struts2,并且有一个“new.jsp”(使用struts2标记),我们需要将它包含在“home.jsp”中。
为了实现这一点,我已将
<s:action namespace="/home" name="showNewJsp" executeResult="true"/>
返回“new.jsp”作为结果。
但当我点击sevlet时,在渲染过程中,我得到了关于struts 2 FilterDispatcher的异常。附加了异常跟踪。
(1)
**(2)** any thing is missing ?
以下是异常跟踪:
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]
at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
at org.apache.jsp.matterhome_jsp._jspx_meth_s_005faction_005f0(matterhome_jsp.java:5021)
at org.apache.jsp.matterhome_jsp._jspService(matterhome_jsp.java:1339)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)