How to use Servlet in Struts2

Lohit picture Lohit · Mar 14, 2011 · Viewed 20.4k times · Source

How to use servlets together with Struts2?

Answer

Steven Benitez picture Steven Benitez · Mar 14, 2011

I assume you want to know how to use a servlet in conjunction with Struts2 when you have mapped everything to the Struts2 filter.

You can use the following in your struts.xml:

<constant name="struts.action.excludePattern" value="/YourServlet"/>

You can exclude multiple patterns by separating them with a comma, such as:

<constant name="struts.action.excludePattern" value="/YourServlet,/YourOtherServlet"/>

More Information