you might want to try putting the servletXYZ.jar file in your
jdk/jre/lib/ext directory
--David
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, January 10, 2002 03:02 PM
Subject: Servlet Compilation Error
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet
{
public void doGet (HttpServletRequest request, HttpServletResponse
response)
throws IOException, ServletException
{
response.setContentType ("text/html");
PrintWriter out = response.getWriter ();
out.println ("<html>");
out.println ("<body>");
out.println ("<head>");
out.println ("<title>Hello World!</title>");
out.println ("</head>");
out.println ("<h1>Hello World!</h1>");
out.println ("</body>");
out.println ("</html>");
}
}
On trying to compile this servlet program, I get the error message, "package
javax.servlet does not exist".
On compiling the same program using this command "$javac -classpath
/usr/local/tomcat-4.0.1/common/lib/servlet.jar HelloWorld.java" there are no
errors.
Does the compilation of the servlet depend on setting up the proper context
in
the server.xml file???
Thanks in advance,
Samarth
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>