-------------- Original message ---------------------- From: "Alla Winter" <[EMAIL PROTECTED]> > For Tomcat 4.x I didn't have to set up anything in web.xml. But it seems > that I have to define each servlet name and corresponding class name in > web.xml in order to make it to work for Tomcat 5.5. Is that right > statement? > I have a lot of servlets, it seems like it is a lot of work. > Can not find what info is required in web.xml and what is optional? Can you > please refer me to that info? > Thanks > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
Yes, that is correct. Within the <servlet> element you must have the <servlet-name> element, which can be any unique name you want, and the <servlet-class> element which has the real class name. Then within the <servlet-mapping> element you must have a <servlet-name> which is the same as one of the names from the <servlet> section, and you must have a <url-pattern> element which tells Tomcat the url pattern that it will map to the identified servlet. Here is an example for a servlet called "Login": <servlet> <servlet-name>Login</servlet-name> <servlet-class>net.homeip.coconets.sessionpkg.Logout</servlet-class> </servlet> <servlet-mapping> <servlet-name>Login</servlet-name> <url-pattern>/Login</url-pattern> </servlet-mapping> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]