On Wed, 28 Mar 2001, Kieran Jones wrote:

> I've added the jar files containing all my servlet class files to
> Tomcat's classpath. When Tomcat starts up (in stand-alone mode)
> it displays the classpath in use and my jar files show up in it OK.
>
> My servlet's web.xml file is defining the servlet correctly as far as
> I can tell.
>
> However, attempts to then invoke the servlet with:
>
>   http://<host>:<port>/servlet/<servletName>
>
> cause Tomcat to report a 404 - Not Found error, as if it's
> interpreting the URL as a simple webserver page request, rather
> than as a servlet invocation.
>
> Is Tomcat not finding my servlet code because I can't use the
> classpath/jar mechanism to tell it where to look? Do I need to
> explicitly populate a "classes" subdirectory within my servlet's
> WEB-INF directory with all my separate class files instead?

Looks like you're missing the context part of the URL, i.e., the
typical form is slightly different from what you have above, a la:

   http://<host>:<port>/<contextName>/servlet/<servletName>

I think it is possible to use a "default" context, but I don't know
the details on that.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to