2010-02-03 3 views
0

J'ai une servlet qui nous amène à un jsp existant, disons "home.jsp". Ceci est composé de nombreux fragments jspf. Donc, la struture est commeAccès à des entretoises 2 jsp à partir de non-entretoises 2 action

Home.jsp inclut jsp1, jsp2 et ainsi de suite.

Maintenant nous avons une partie des modules migrés vers struts2 et ont un "new.jsp" (utilise des tags struts2) que nous devons inclure dans "home.jsp". Pour y parvenir, je l'ai placé

<s:action namespace="/home" name="showNewJsp" executeResult="true"/> 

qui renvoie la « new.jsp » comme résultat. Mais quand j'appuie sur la touche, pendant le rendu, je reçois une exception à propos des entretoises 2 FilterDispatcher.

Le chemin d'exception est joint.

S'il vous plaît préciser si (1) Est-ce possible de rendre un S2 jsp tout en ne rendant pas via l'action S2

   **(2)** any thing is missing ? 

Ce qui suit est la trace d'exception:

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) 

Répondre

0

ok, Il n'était pas possible d'utiliser les balises Struts 2 directement, mais j'ai travaillé.

Nous pouvons utiliser <iframes> pour diviser les sections qui sont basées sur S2. Fournir une URL S2 à l'intérieur des travaux iframe et la vue peut être rendue en conjonction avec le jsp non basé sur S2.

Questions connexes