Hi Guys,
     I recently had WebLogic training and this Instructor said that instead of
using the
doGet() (or) the doPost() method,  over-write the service() method. He says that
if you use either a
doGet()  (or) doPost() method, the WebServer has to do a POLYMORPHIC lookup on
these methods in the
service() method. This will lead to a little bit of in-efficiency.  Instead if
you over-write the service() method, there
won't be any polymorphic lookup.  I argued with him that the Java Servlet
specs..tell us not to over-write the
service() method, but to no avail .  Any suggestions - comments welcome.

Cheers,
Amar..






"Kirkdorffer, Daniel" <[EMAIL PROTECTED]> on 10/12/99 11:46:13 AM

Please respond to "Kirkdorffer, Daniel" <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Amarnath Nanduri/IT/VANCPOWER)
Subject:  Re: doPost versus doGet - DESIGN DECISION???




Personally I would suggest that both doPost and doGet call another method to
do common processing, which allows for special case processing in either
doPost or doGet if necessary.

Dan

> ----------
> From:         Rupesh Choubey[SMTP:[EMAIL PROTECTED]]
> Reply To:     Rupesh Choubey
> Sent:         Monday, October 11, 1999 7:56 PM
> To:   [EMAIL PROTECTED]
> Subject:      doPost versus doGet - DESIGN DECISION???
>
> quick question for the DESIGN gurus.......
>
> we have a html+servlet+EJB+jsp application we are building.....
>
> the servlets we use have the primary function of determining where we come
> from and what actions were taken on the pages, etc....
>
> some of our servlets serve MULTIPLE pages......hence in certain servlets,
> we
> need to first detemine which page we came from and then determine what
> actions were taken.....
>
> the pages have URLs as well as other elements such as listboxes, buttons,
> etc.
>
> my question is: does it make sense to have both doPost and doGet
> methods...here are some of my approaches....i need help validate which is
> a
> better one and which people have been successful with.....
>
> *****Approach 1****: servlet has BOTH doGet and doPost. doGet serves URL
> requests and doPost serves button presses and such events
>
> *****Approach 2****: servlet has all the code in the doPost method.....the
> doGet method only redirects to the doPost
>                 doGet(HttpServletRequest req, HttpServletResponse res) {
>                         doPost(req, res);
>                 }
>                 doPost(HttpServletRequest req, HttpServletResponse res) {
>                         if (req.getParameter("pageId") == LOGIN_PAGE) {
>                                 do_login_stuff();
>                         } else .......BLAH BLAH BLAH
>                 }
>
> please help with as much detail as possible....also, if you know of any
> sites with such info, it will be awesome..
>
> thanks,
> Rupesh.
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to