rj4u
rj4u

Reputation: 97

App specific filters in Tomcat

I have two applications running on different ports of my Tomcat. I have added a filter in my web.xml. This filter class exists in only one of the two applications code/war file. When I start the tomcat, I get java.lang.ClassNotFoundException: com.abc.filter.MyFilter The result is, application which has filter class runs fine, but other one does not start. My question is : Is there any way to specify application specific filters in Tomcat web.xml so we can load the applications which do not have a particular filter class? Thanks.

Upvotes: 1

Views: 171

Answers (1)

Titus
Titus

Reputation: 22484

Yes, you can setup app specific configurations by adding a web.xml file in the application's WEB-INF folder instead of setting up global configurations by modifying the XMLs in Tomcat's conf folder

Upvotes: 2

Related Questions