Assuming these two methods have similar business functionality, there is no
technical reason to develop two different servlets and double your
administration requirements.  At the same time, you should not use
"doPost()" and "doGet()" to distinguish which method will be invoked.

A better solution might be to pass a parameter in from your HTML, and use
HttpServletRequest.getParameter(key) - where "key" matches an HTML parameter
- to determine which method to invoke.  "getParameter()" works with both
doPost (where it retrieves form parameters) and doGet (where it retrieves
query string parameters).

-----Original Message-----
From: Ailawadhi, Ajay [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 11, 1999 6:57 PM
To: [EMAIL PROTECTED]
Subject:


Hi,

I have a quick "optimum design" question.

If I have two methods in my EJB that are being accessed by a servlet, should
I have two servlets for the two method invocations (by the doGet() of either
servlet) or should just one servlet call the two methods (one via doGet()
and the other via doPost()) ?

I can envision different scenarios but would appreciate more thorough
feedback of the tradeoffs.

Thanks!

Ajay

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to