Hi all,

My problem is, that I'd like to configure a valve for only one deployed application (deployed as a .war file)

Here are the ways I've already tried:

- Putting the <Context> element into server.xml. This works, however, after doing this, the manager application won't let me redeploy the application (gives an error message describing this). - Putting the valve declaration into conf/context.xml. This also works, however, this way the valve configured for all deployed applications, which is not possible in my case (the valve is doing authentication stuff, which I do not want to take effect for other apps, eg the manager app) - Putting the valve declaration into conf/Catalina/localhost/myapp.xml. This also works fine, however this file is always deleted after redeployment (as far as I know, this was introduced to tomcat 7, as autoDeploy=false does not disable the deletion of context files). The official solution to this, - according to the manual - is to put the context.xml file into the .war file itself. However, the problem with this, is that the context contains database connections, mail sessions, etc. that are different for every environment where the .war file is deployed. That's why I'd like to stick with an external way of configuration.

Questions:
- Any idea how to have an external, application specific (that is, non-shared) context file that is not deleted on redeployment in the manager? - Or maybe deploy the app in a different way that retains the app-specific context file?
- Any other solution to my problem in general?

I'm using Linux and Tomcat 7.0.37.

Kind regards,
Istvan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to