wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts2 isn't playing nice with my old submit/Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 isn Watch "Struts2 isn New topic
Author

Struts2 isn't playing nice with my old submit/Servlets

Mister Case
Greenhorn

Joined: May 23, 2011
Posts: 1
I have a setup using Tomcat 6 that utilizes my own MVC framework and all my submits post to servlets work fine.

I then created a simple struts2 app and modified my web.xml file to contain the following struts2 filter:

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

My new struts2 jsp submit worked fine but all my previous jsps (which use to work) now fail on submit. (I have no idea why but its related to my url-pattern in the filter-mapping.)

To fix my non struts2 submits I altered the /* url pattern (see above) to any garbage like /Struts* in my web.xml
This obviously breaks my struts2 submit but fixes all of my non struts2 submits.

Is there a way to get both my struts2 submits and non struts2 submits to work on the same development environment without
altering the web.xml file filter-mapping section between tests?

Thanks

 
 
subject: Struts2 isn't playing nice with my old submit/Servlets
 
Similar Threads
Struts2 integration with Spring Security
Struts2 with Displaytag export option is not working
Displaytag Data Export Problem with Struts2
Static content caching problem in Struts2
struts2 url mapping issue with servlet