Thanks!

But I noticed that the problem is the JDK version. I changed it to 1.1.8 and it works 
perfectly. So for me JServ is so 1.1.x compliant after all.

PC

Aaron Schinkowitch wrote:

> Assuming you have apache & apache jserv up and running properly, the most obvious 
>problem in you code is that doGet() shouldn't throw any exceptions.  So try catching 
>them in the function, like so:
>
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
>
> public class HelloWorldServlet extends HttpServlet {
>
> public void doGet(HttpServletRequest req, HttpServletResponse res)
> {
>     try
>     {
>         PrintWriter out;
>
>         res.setContentType("text/html");
>         out = res.getWriter();
>         out.println("<html>");
>         out.println("<head>");
>         out.println("</head>");
>         out.println("<body>");
>         out.println("<center>");
>         out.println("HOWDY!!!!!!!!!!!");
>         out.println("</body></html>");
>         out.close();
>     }
>     catch (Exception e)  {  }
>   }
>
> Aaron Schinkowitch
> Developer
> Web-X LLC
> [EMAIL PROTECTED]
>
> >>> Paulo Cabrita <[EMAIL PROTECTED]> 07/22/99 07:58AM >>>
> Hello,
>
> I'm a newbie develloping servlets and I have, for you a little problem,
> but for me, a big problem. I can't make running a simple servlet like
> "Hello World".
>
> I have the Apache 1.3.6 working on a NT machine and the jserv is the
> 1.0b5 version. I use the JDK 1.1.6
> The code is:
>
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
>
> public class HelloWorldServlet extends HttpServlet {
>
>   public void doGet(HttpServletRequest req, HttpServletResponse res)
>     throws ServletException, IOException {
>     PrintWriter out;
>
>     res.setContentType("text/html");
>     out = res.getWriter();
>     out.println("<html>");
>     out.println("<head>");
>     out.println("</head>");
>     out.println("<body>");
>     out.println("<center>");
>     out.println("HOWDY!!!!!!!!!!!");
>     out.println("</body></html>");
>     out.close();
>   }
>
> Can anybody tell me what's wrong? Can you help me?
>
> A thousand thanks.
>
> PC
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> READ THE FAQ!!!!     <http://java.apache.org/faq/>
> Archives and Other:  <http://java.apache.org/main/mail.html/>
> Problems?:           [EMAIL PROTECTED]
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> READ THE FAQ!!!!     <http://java.apache.org/faq/>
> Archives and Other:  <http://java.apache.org/main/mail.html/>
> Problems?:           [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to