In Struts I have used

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

Doing above, Struts avoids looking for /servlet-action into struts.xml and goes to web.xml.

How to achieve this in Spring MVC?

Or can @RequestMapping be done for servlets?

1

There are 1 answers

0
Roman C On

You can achieve this if you map Spring MVC servlet to either than a default servlet. Then it could be handled by the servlet container.

To exclude some patterns from the mapping you can use url rewrite filter. You can read more about this in my answer to How can URL rewriting in Struts2.x.