Hi room,
I have just started servlets. This code is giving some problem. I think the problem is in PATH or CLASSPATH. But I have set it correctly.

set path = c:\jsdk2.0\bin; %path%
set classpath = c:\jsdk2.0\lib\jsdk.jar; %classpath%

My code is :



import javax.servlet.*;

public class firstser extends GenericServlet
{
   public void service(servletRequest req, servletResponse res)
   {
      try
      {
         ServletOutputStream sos = res.getOutputStream();
         sos.println("<html><body bgcolor =red text =white>");
         sos.println("<h1>Sudha</h1></body></html>");
      }
      catch(Exception e)
      {}
   }
}



I am getting these errors when compile :


1.    Package javax.servlet not found.

2.    Superclass GenericServlet of the class firstser not found


Please help me how to come out of this problem.

sudha..,

Reply via email to