How are initialization parameters passed to a servlet under Servlet API version 2.2?
Location: http://www.jguru.com/faq/view.jsp?EID=129378 Created: Aug 17, 2000 Modified: 2000-08-18 19:29:39.156 Author: Avi Kak (http://www.jguru.com/guru/viewbio.jsp?EID=26410) Through the webapp deployment descriptor, which is the web.xml file in the directory WEB-INF. Note that there are two different types of web.xml files in Tomcat 3.x: There is a web.xml that sits in the top-level configuration directory TOMCAT_HOME/conf and then there can be a separate web.xml for each webapp in the directory WEB-INF for that webapp. You would want to keep webapp specific deployment information, such as initialization parameters and their values, in the web.xml specific to that webapp. The best on-line example that illustrates servlet initialization through a webapp’s deployment descriptor is, I believe, the ServletParam servlet in the test webapp in your Tomcat software package. This servlet can be called with two different canonical names, as for example in http://localhost:8080/test/servlet/se
Related Questions
- For the servlet layer on the web server, what version of the Java Servlet API are the PIA Java Servlets coded to with PeopleTools 8.4?
- what version of the Java Servlet API are the PIA Java Servlets coded to with PeopleTools 8.4?
- How are initialization parameters passed to a servlet under Servlet API version 2.2?