Thanks for the reply, I need to disable or enable the servlets depending on the input data for example, if its a production eniv, I need few servlets to be available and for test i doesn't require them, so basically i need to update the servlets in web xml to support my configuration.
Is there any possibility of using load-on-startup values and setting this?
Perhaps you could do this with a front controller and context attributes that you can set through some servlet, but it would require your entire web application to be rewritten to use that front controller.
No, It does not need to send a 404 message, the scenario here is, I have a bunch of servlets in web xml file and depending on the input data my web xml should be modified such that only servlets required for my app based on the input should be present in the web xml and other servlets in the web xml should be disabled.
Sounds like this a build-time issue not a run-time issue. If you are building for the test environment, create a web.xml that includes the extra servlets. For a production build, leave them out of the web.xml.
Yeah thanks for the info, but i was trying to find whether there is a possibility of having one web xml and the servlets related to the app in it as like i have now, and to turn off the servlets depending on the environment selected, without doing it manually.
But guess from your answers, there is no option to do so, Am i right?