The "UploadTest.class" file.
-----Original Message-----
From: Carlos López M. [mailto:clopez@grupounika.com.mx]
Sent: Friday, February 23, 2001 5:08 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: Servlet problem
Thanks for the tip, but another question what's has to go in the /servlet/
folder
-----Mensaje original-----
De: Michael Wentzel [mailto:Michael.Wentzel@aswethink.com]
Enviado el: Viernes, 23 de Febrero de 2001 03:24 p.m.
Para: 'tomcat-user@jakarta.apache.org'
Asunto: RE: Servlet problem
> Here is the diferent code, could somebody tell if something is wrong
>
> Directori
>
> /webapps/
> /serv/uploadtest.html
> /servlet/UploadTest.java
>
> web.xml, where does the UploadTest.java supose to be??
>
> <servlet>
> <servlet-name>
> UploadTest
> </servlet-name>
> <servlet-class>
> UploadTest.java
> </servlet-class>
> <load-on-startup>
> 4
> </load-on-startup>
> </servlet>
First, the servlet-class should be your class not your source files.
Therefore if your class is in package servlet.UploadTest it would be
<servlet-class>
servlet.UploadTest
</servlet-class>
If you are not using a package specifier it would just be
<servlet-class>
UploadTest
</servlet-class>
Second, you should put your class file in
WEB-INF/classes/<package>/<classname>.class
>
> <servlet-mapping>
> <servlet-name>
> UploadTest
> </servlet-name>
> <url-pattern>
> /servlet/UploadTest
> </url-pattern>
> </servlet-mapping>
The reason the example servlets are ./servlet/<ServletName> is not because
they're in the servlet package but because that is the default mapping.
---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com
mailto:wentzel@aswethink.com
- Punisher of those who cannot spell dumb(JG)!
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org
|