-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 To whom it may concern,
On 6/9/2010 10:07 AM, Vitalstatistix wrote: > Hey, I've just been working on this tutorial here: > > http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/index.html > > It has been pretty good and I've got the jsp page to show the time but when > I try going to the HelloServlet I get the error 500. > > [...] > > javax.servlet.ServletException: Wrapper cannot find servlet class > com.example.servlets.HelloServlet or a class it depends on Looks like Tomcat can't find your servlet class. > root cause > > java.lang.ClassNotFoundException: com.example.servlets.HelloServlet Okay, so you've gotten to the "Hello World Servlet" section? Do you have this line of code at the very top of the file: package com.example.servlets ? Check the exact spelling: it's important. > <servlet> > <description></description> > <display-name>HelloServlet</display-name> > <servlet-name>HelloServlet</servlet-name> > <servlet-class>com.example.servlets.HelloServlet</servlet-class> > </servlet> This definition looks correct. > <servlet-mapping> > <servlet-name>HelloServlet</servlet-name> > <url-pattern>/HelloServlet</url-pattern> > </servlet-mapping> This mapping is correct. You are visiting http://yoursite/example/HelloServlet and getting 500, then? > Sorry I don't know how to add code tags in this forum. I'm using Tomcat 6. > I've > made no changes to ANY web.xml files, I simply followed that short basic > tutorial step by step. My HelloServlet.java class is exactly the same as in > the tutorial and is in the same package. > Could you please tell me why it can't seem to find the class? I'm not sure where Eclipse puts all its files, but if you could track-down the location of the deployment directory (often something like /foo/bar/tomcat-x.y.z/webapps/example) and give us a file listing including subdirectories and files in those subdirectories, we might be able to help. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwP36kACgkQ9CaO5/Lv0PBEYwCgr9l/3RYBkklIl37ELPpMlajY UeYAoIui29MNCiWWu+vh/WbuTsgWqN8Y =suF/ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org