Andy Bailey wrote:
> I would seriously question the idea that you never need more than
> one servlet per application. You should plan on having one servlet for each
> task that is part of the application and if you abstract things properly you
> can reduce this number usually.
>
> It is also a bad idea to override the servlet service method as that is
> usually
> implemented by the ServletEngine vendor to route requests to the right
> place.
>
> If you try and have one servlet that does all you are placing all your eggs
> in one basket.
> You will end up with a large, hard to maintain and badly implemented servlet
> that
> will never end up doing things as you it to in the first place.

If you use more then one servlet per application, you need a one
special servlet for initializing common resources like database
connections or HTML templates, otherwise servlets cannot share resources.

The servlet should be just a frontend to your bussiness-logic classes,
so it will not be large and hard to maintain.

Martin
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   INET, a.s.                          Mgr. Martin Kuba
Kralovopolska 139                  e-mail: [EMAIL PROTECTED]
  601 12 Brno                      WWW: http://www.inet.cz/~makub/
 Czech Republic                    tel: +420-5-41242414/33
--------------------------------------------------------------------
PGP fingerprint = D8 57 47 E5 36 D2 C1 A1  C3 48 B2 59 00 58 42 27
 http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
--------------------------------------------------------------------

___________________________________________________________________________
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