tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daliso Zuze" <>
Subject Re: Servlet directory
Date Sat, 03 Aug 2002 19:13:05 GMT
Thanks, I got it working now, I had misplaced the classes directory.


----- Original Message -----
From: "Jacob Kjome" <>
To: "Tomcat Users List" <>
Sent: Saturday, August 03, 2002 7:18 PM
Subject: Re: Servlet directory

> The way you are trying to access this servlet implies a couple of
> 1.  Your servlet is in the default package.  That is to say that it exist
> in WEB-INF/classes and not some directory deeper inside of that.
> 2.  Your class is all lower case "myservlet" since that is how it is
> written on the URL your provided below.
> I think it is probably likely that #1 is true.  However, I'm guessing that
> #2 is not.  The general practice for naming classes is to use Capital
> letters for each distinct part of the class name.  For instance, you
> probably named your class "MyServlet", not "myservlet".  As such, the URL
> you provided won't work.  It should be:
> http://localhost:8080/myapp/servlet/MyServlet
> Note that <servlet> and <servlet-mapping> entries in your own web.xml have
> nothing in particular to do with accessing your class through Tomcat's
> default servlet invoker which is mapped to /[your context]/servlet/*.
> The other thing you should look at is that the directory that your app is
> running out of exists in:
> "$TOMCAT_HOME/webapps/myapp"
> make sure that "myapp" is in all lower case.
> Oh, and make sure that there are no spaces in $TOMCAT_HOME.  If you have
> installed in a directory like "Program Files", you can do the following
> Windows).  I'll use my setup as an example.
> $CATALINA_HOME=C:\Progra~1\Apache~1\Jakarta\tomcat-4.1.8
> The original path is:
> C:\Program Files\Apache Group\Jakarta\tomcat-4.1.8
> Just use the tilde's to fix directory names which have spaces.  The names
> with tilde's can be no more than 8 chars long.
> Restart Tomcat after using the hints above and things should work just
> Jake
> At 10:51 AM 8/3/2002 +0200, you wrote:
> >I have put some servlet classes in my web applications classes directory,
> >however when I try to access it via the url
> >http://localhost:8080/myapp/servlet/myservlet it does not work. It seems
> >to only work when I put the classes in the default ROOT web app and
> >it via http://localhost:8080/servlet/myservlet.
> >
> >Is there a way of configuring tomcat to make it work from the first

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message