Scott, I am not trying to be rude, but you'd be better off diving into a
good book on jsp/serlets.

It helps a lot, even if you are used to perl/php/asp.

James Mitchell
Software Engineer\Struts Evangelist


> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Carter, Scott
> Sent: Tuesday, June 04, 2002 3:18 PM
> To: [EMAIL PROTECTED]
> Subject: Very begginer question
>
>
> I am guessing that the first method hit is doGet.  When is the
> doPost method
> run?  What other special methods are there that execute at pre defined
> times?  The example I am looking at is below, it is one of the
> free examples
> that comes with the Tomcat web server.
>
> Thanks - Scott
>
>
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class RequestInfo extends HttpServlet {
>
>     public void doGet(HttpServletRequest request, HttpServletResponse
> response)
>     throws IOException, ServletException
>     {
>         response.setContentType("text/html");
>         PrintWriter out = response.getWriter();
>         out.println("<html>");
>         out.println("<body>");
>         out.println("<head>");
>         out.println("<title>Request Information Example</title>");
>         out.println("</head>");
>         out.println("<body>");
>         out.println("<h3>Request Information Example</h3>");
>         out.println("Method: " + request.getMethod());
>         out.println("Request URI: " + request.getRequestURI());
>         out.println("Protocol: " + request.getProtocol());
>         out.println("PathInfo: " + request.getPathInfo());
>         out.println("Remote Address: " + request.getRemoteAddr());
>         out.println("</body>");
>         out.println("</html>");
>     }
>
>     /**
>      * We are going to perform the same operations for POST requests
>      * as for GET methods, so this method just sends the request to
>      * the doGet method.
>      */
>
>     public void doPost(HttpServletRequest request, HttpServletResponse
> response)
>     throws IOException, ServletException
>     {
>         doGet(request, response);
>     }
> }
>
> __________________________________________________________________
> _________
> 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