this <servlet-class>servlet.maiservlet</servlet-class> means that the class maiservlet.java must be in the package servlet.
Otherwise, you indicate the path of the class maiservlet.class in a package manner. Fahmi 2011/3/31 Jonatan Aguirre Kobayashi <jona.agui...@gmail.com> > Fahmi, when i access to http://localhost:8080/myapp/maiservlet tomcat > display this error: > java.lang.ClassNotFoundException: servlet.maiservlet > > I have Tomcat 7.0.8. > > > > 2011/3/31 Fahmi Hachicha <fahmi.hachi...@gmail.com> > >> Hello, >> >> You can map the sevlet in this manner in your web.xml >> >> <servlet> >> <servlet-name>maiservlet</servlet-name> >> <servlet-class>servlet.maiservlet</servlet-class> >> </servlet> >> >> >> <servlet-mapping> >> <servlet-name>maiservlet</servlet-name> >> <url-pattern>/maiservlet</url-pattern> >> </servlet-mapping> >> >> Good lack >> Fahmi >> >> 2011/3/31 Justin Randall <ran...@hotmail.com> >> >> > Read up on web.xml and using Serlvet mappings to define paths that map >> to >> > the Servlet class itself. >> > >> > It looks like you're currently using direct servlet invocation. >> > >> > ------Original Message------ >> > From: Jonatan Aguirre Kobayashi >> > To: users@tomcat.apache.org >> > ReplyTo: Tomcat Users List >> > Subject: Customize URL access >> > Sent: Mar 31, 2011 09:17 >> > >> > Hello, a have a application and the url is for example >> > http://localhost:8080/myapp/servlet/maiservlet. >> > How i do to access to my application with this url: >> > http://localhost:8080/myapp/maiservlet (without servlet reference) >> > >> > >> > PD: Sorry , my english is not good. >> > >> > >> > >> > Sent from my BlackBerry device >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> > For additional commands, e-mail: users-h...@tomcat.apache.org >> > >> > >> > >