hi senaka -

        i believe you need to add the lib/servlet.jar file
        that is distributed with jswdk 1.0 and jsdk 2.1 to
        your classpath.

        questions like these are often posted to and answered
        from folks on the [EMAIL PROTECTED] you
        also might want to consider perusing the servlet-interest
        archives:

        http://archives.java.sun.com/archives/servlet-interest.html

        hope this helps,

- james

ssuriyaarachchi wrote:
>
> Hi all,
>
> While compiling a servlet code which is attached with this message I receive
> the following errors 1, 2 and 3
> could you please suggest as to where I am going wrong and what it he
> settings I need to configure on my computer to handle this error.
>
> The error is
>
> import javax.servlet.*;
> 1) error message :- Package javax.servlet not found in import.
>
> import javax.servlet.http.*;
> 2) error message :- Package javax.servlet.http not found in import
>
> public class HelloWorldAbhiServlet extends HttpServlet
>
> 3) error message :- Superclass HttpServlet of class HelloWorldAbhiServlet
> not found
>
> ------ This is the servlet code ------
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> public class HelloWorldAbhiServlet extends HttpServlet {
>     public void doGet (HttpServletRequest req, HttpServletResponse res)
>         throws ServletException, IOException
>     {
>         res.setContentType("text/html");
>         ServletOutputStream out = res.getOutputStream();
>         out.println("<html>");
>   out.println("<head><title>Hello Abhinand</title></head>");
>         out.println("<body>");
>   out.println("<h1>Hello  Abhinand</h1>");
>         out.println("</body></html>");
>     }
>     public String getServletInfo() {
>   return "Hello  Abhinand The information is sent back";
>     }
> }
>
> ---- End of servlet code
>
> please reply back as soon as possible.
>
> thank you
> Senaka
>
> Phone: 408-468-5546
> Address: 3051 North First Street
>               San Jose, CA
>               95134
>               USA
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to