Hi Will:

Write a "doGet(HttpServletRequest, HttpServletResponse)" method first and then
the link should work.

Regards,
Geeta

"Kwan, William" wrote:

> hi,
>
> I created a simple servlet something similar to Hello World.  I placed the
> servlet in c:\javawebserver2.0\servlets directory.  Here is how I call it:
> http://localhost:8080/servlet/SimpleServlet
>
> I get an Not Found(404) error.
>
> Is there something else I need to do??  I can run the examples that come
> with Java Web Server 2.0.
>
> Here is the code:
> import java.io.*;
> import java.util.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class SimpleServlet extends HttpServlet
> {
> public void doPost(HttpServletRequest request, HttpServletResponse response)
>
>         throws IOException, ServletException
>         {
>         response.setContentType("text/html");
>         PrintWriter out = response.getWriter();
>
>         try{
>         out.println("<html>");
>         out.println("hello World");
>         out.println("</html>");
>         out.close();
>         }catch(Exception e) {}
>         }
> }
>
> thanks,
> Will
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to