× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Frances, this is very interesting and enlightening information.  I've often 
wondered about this.  I had always assume that the method invoked by 
HttpServlet is based on the type of HTTP request.  However, I had also assumed 
that a direct link to a servlet using the <a href=...> technique caused the 
browser to issue an HTTP GET.  Is this incorrect??

Similarly, what happens with a JSP forward?  What type of "request" is 
forwarded?  Wouldn't it be the same as the request that originally invoked the 
servlet doing the forwarding?

I suppose I ought to add my usual addendum: "And if you know of links to any 
more information on this subject, please feel free to let me know" <grin>.  
Specifically, I'd love some documents on the internals of the interactions 
between browsers, application servers and servlets.  The Javadoc is good for 
implementation, but doesn't really tell me much about the internals.

Joe

---------- Original Message ----------------------------------
From: "Frances Stewart" <francess@us.ibm.com>
Reply-To: JAVA400-L@midrange.com
Date: Thu, 8 Feb 2001 09:38:25 -0600

>
It is not necessarily incorrect to override the service() method. It
depends on how you plan on the servlet being invoked. If the servlet will
only be invoked as the result of a
 <FORM METHOD="post" ACTION=.../> or <FORM METHOD="get" ACTION=.../>, etc.
tag, then you should not override service() and you should implement doGet
and doPost.

However, if your servlet will be invoked from a JSP using forward, or if
you will invoke the servlet directly from an HTML tag such as <a href
="http://as400service.ibm.com/servlet/EstimatorServlet">Workload
Estimator</a>, you will need to implement the service() method.

There are two classes, GenericServlet and HttpServlet.  HttpServlet extends
GenericServlet and adds the doXXX methods which add functionality for
invoking the servlet from an HTML page. The Javadoc for both classes can be
seen at http://java.sun.com:80/products/servlet/2.3/javadoc/index.html.


+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.