Hi,
I took a program ( using servlet ) from a book, so I suppose it runs
correctly, I tried it on my PC using sun-java6.  Does it have another name?
Other programs, with (swing, applet ...), run correcly.
I searched servlet class in javax, I didn't find it
the error is at the import javax.servlet.*; import javax.servlet.http.*;

here is the example

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class CalculPerimeter extends HttpServlet {
    public void doGet( HttpServletRequest req, HttpServletResponse rep)
            throws IOException, ServletException {
     rep.setContentType("text/html");
     PrintWriter pw = rep.getWriter();
     pw.println("<html>");
     pw.println("<head>");
     pw.println("<title> Just a servlet </title>");
     pw.println("</head>");
     pw.println("<body bgcolor='white'>");
     if (req.getParameter("ray") == null) {
        pw.print("<font size=+1> ");
        pw.println(" need to know the value of the ray!</font>");
     }
     else {
        int tmp=Integer.parseInt(req.getParameter("ray"));
        Circle C = new Circle(0, 0, tmp);
        double p = C.perimeter();
        pw.println("The ray is "+tmp+"perimeter "+ p);
     }
     pw.println("</body>");
     pw.println("</html>");
    }
}

The Circle class is of couse defined.

Reply via email to