This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I need to invoke a Struts2 action using <jsp:include> (I can't use <:s:action> because it doesn't result in a new request, and I need to be able to cache the response from the included action using a Servlet filter.). However, when I set up my Struts filter to handle includes
I get the following exception in Glassfish V2.1. Any suggestions?
SCJP, SCWCD, SCBCD, SCEA 5
J J Wright
Ranch Hand
Joined: Jul 02, 2008
Posts: 254
posted
0
This doesn't work in Tomcat 6 either so I guess its a limitation / problem with Struts 2.1.6. I have to day I find it incredible you can't perform a JSP include on a Struts action.
I have a suspicion it will work when I use org.apache.struts2.dispatcher.ng.servlet.StrutsServlet as opposed to org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter. However, the API docs contain the following warning for using StrutsServlet:
This servlet dispatcher is only for those that really know what they are doing as it may not support every feature of Struts, particularly static resource serving.
All in all pretty disappointing - I may end up ditching Struts2 altogether.