tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: creation of application wide objects
Date Thu, 21 Dec 2000 18:24:26 GMT
Alistair Hopkins wrote:

> I also have lots of this sort of nonsense.
> My planned solution is to have only one servlet.  This will act as a broker
> to load 'logic modules', which are invoked thru' the url with xtra path
> info:
> http://myServer/myServlet/myModule?yada=yada&foo=bar
> This has lots of potential advantages as all requests to a given webapp will
> be processed by the same servlet, making many things easier.  The myModule
> will then implement an interface/extend functionality of my choosing, rather
> than being saddled with the servlet spec.  The servlet will just load on
> startup, and any application-scope objects ith it.

For a fully fleshed out framework that uses the "single servlet" approach, check
out the Struts Framework at <>.  This framework
uses an MVC architecture, with a (single) servlet functioning as the
(C)ontroller, passing control to business logic in Action classes, which will
manipulate JavaBeans that comprise the (M)odel, and then transfer to JSP pages
that represent the (V)iew.  A comprehensive custom tag library is also included,
which provides substantial assistance when creating form-based,
internationalized applications.

Craig McClanahan

View raw message