I finally found the answer for any that are interested. servlet filters apparently don't trigger (by default) on forwarded and included requests. I had to change my filter url
mapping in web.xml to make the struts2 filter fire....

from:

   <filter-mapping>
       <filter-name>struts2</filter-name>
       <url-pattern>/*</url-pattern>
   </filter-mapping>

to:

   <filter-mapping>
       <filter-name>struts2</filter-name>
       <url-pattern>/*</url-pattern>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
   </filter-mapping>


cheers,

- darren.


Darren James wrote:
Hi all,

I have a servlet that I want to include the result of a struts2 action in the
response. I have a method that's called from my servlet's doGet method,
which does something along the lines of

       .....
RequestDispatcher requestDisp = getServletContext().getRequestDispatcher("/somepackage/ExampleAction.action");
       requestDisp.include(request, response);
       .....


When I invoke the action directly from the browser (i.e. http://myhost/somePackage/ExampleAction.action ), it works just fine. When trying to invoke the action out of the servlet with RequestDispatcher.include(), I get a message in
the response where the output should be that reads

"The requested resource (/somePackage/ExampleAction.action) is not available".

I can't find what's generating this message, and it's not clear to me why my action isn't being invoked. I'm fairly certain I'm doing something stupid, but it's not obvious to me yet. Any ideas?

thanks in advance,

- Darren.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to