tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: [OT] Writing methods in servlets
Date Mon, 08 Dec 2003 15:27:30 GMT

Howdy,
There's nothing wrong with methods in servlets per se.  A servlet is
just another class in Java.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Antony Paul [mailto:antonypaul24@hotmail.com]
>Sent: Monday, December 08, 2003 1:13 AM
>To: Tomcat Users List
>Subject: [OT] Writing methods in servlets
>
>Hi all,
>    Is there any issues associated with writing methods in servlets
other
>than the morality of it( I dont use methods in JSP pages). My
application
>uses controller servlets for redirecting requests to different pages
based
>on the parameter(action) passed to it. Application is designed in a way
>that
>it will have one controller servlet for a group of actions on same
entity.
>Earlier I used to check the action in if else blocks. Now the servlet
is
>becoming cluttered with lots of if else blocks. So I want to move this
to
>methods and I must do it in Servlets itself (The application design
dont
>allow to move this to another class). I know that container creates
>multiple
>threads of servlce method of (I dont know how) same servlet to service
>multiple requests. Then what about other custom methods in servlets.  I
>dont
>use any instance variables.
>
>rgds
>Antony Paul.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message