On Tue, 12 Oct 1999, Andras Balogh wrote:

>         Hi,
>
>     I personally like the first approach. Like this You
> don't have to write a lot of servlets. (One servlet
> instead of two).
>     I am not a guru but i don't feel that the design
> should suffer from this approach.

Not sure what you mean, but the number of servlets one needs to write
doesn't vary with either of the approaches suggested below.


> ----- Original Message -----
> From: Rupesh Choubey <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 12, 1999 4:56 AM
> 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, 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
>

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
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