> > From: [EMAIL PROTECTED] > Date: 2006/01/25 Wed AM 11:13:11 EST > To: "Tomcat Users List" <users@tomcat.apache.org>, "'Tomcat Users List'" > <users@tomcat.apache.org> > CC: "Alla Winter" <[EMAIL PROTECTED]> > Subject: Re: Are servlet name and class name required in web.xml for tomcat > 5.5? > > > -------------- 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> > Deployment Descriptor Element Ordering: icon display-name description distributable context-param filter filter-mapping listener servlet servlet-mapping session-config mime-mapping welcome-file-list error-page jsp-config resource-env-ref message-destination-ref resource-ref security-constraint login-config security-role env-entry ejb-ref ejb-local-ref message-destination locale-encoding-mapping-list
I think that's all. I'm pretty sure they're in the right order. Warren > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]