Hi Bill:
I have been working since last three days. How to compile servlet? It is not comming out. Please help.
Tomcat is running. I can execute tomcat servlet examples. They work fine. But I can not compile my simple servlet as below.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloServlet extends HTTPServlet
{
public void doGet(HTTPServletRequest req,
HTTPServletResponse res)
throws HTTPServtException, IOException
{
PrintWriter out = res.getWriter();
out.println("Hello");
}
}
I had following errors.
HelloServlet.java:2 package javax.servlet does not exit
HelloServlet.java:2 package javax.servlet.hhtp does not exit
I have set class path C:\tomcat\lib\servlet.jar. Set TOMCAT_HOME = tomcat. SET JAVA_HOME=jdk1.3. Even I copied servlet.jar file from tomcat/lib folder to tomcat\webapps\example folder. This is the place where I am compiling my servlet. It did not help. It is really frustating. BK
Originally posted by William Brogden:
3. With a browser go to http://localhost:8080/
and you should get the Tomcat start page.
4. If it doesn't work, make note of the error messages.
Bill[/B]