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

Reply via email to