While packageless classes are frowned upon, and will bite you later, below
should work. Restart the ROOT webapp using the manager applet
(http://localhost:8080/manager/html) and then try http://localhost:8080/ch1.
Check the logs for errors
<servlet>
<servlet-name>ch1</servlet-name>
<servlet-class>Ch1Servlet</servlet-class>
|________________What goes here?
</servlet>
<servlet-mapping>
<servlet-name>ch1</servlet-name>
<url-pattern>/ch1</url-pattern>
</servlet-mapping>
--David
[EMAIL PROTECTED] wrote:
ensure you put it in correct package.
My example servlet is not part of a package. Here is the opening part of the
source code file:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class Ch1Servlet extends HttpServlet{
The author probably mean the classname+package.
Since my servlet is not part of a package, I placed it in the default "classes"
directory:
C:\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes
Given these two pieces of information, how should I fill in the web.xml file:
<servlet>
<servlet-name>ch1</servlet-name>
<servlet-class>^</servlet-class>
|________________What goes here?
</servlet>
<servlet-mapping>
<servlet-name>ch1</servlet-name>
<url-pattern>/ch1</url-pattern>
</servlet-mapping>
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]