tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Cook" <>
Subject Design Opinion
Date Wed, 24 May 2000 20:41:03 GMT
I'm developing a portal application (who isn't?) that is somewhat flexible
in its design. It is driven by a servlet named Portal that makes calls to
other classes that are responsible for generating sections of HTML. Most
frameworks refer to these sections of HTML as Portlets.

I needed a container that would house these Portlets, and for various
reasons, I decided to make them servlets as well. There are quite a few
advantages to this approach:

1. Lifecycle of the servlet is managed by the servlet engine. I didn't have
to develop a container to manage access to them. If I need a portlet to be
single threaded, I can use the SingleThreadedModel interface, otherwise the
servlet manages the multithreading.

2. The main servlet can invoke them fairly easily using the
RequestDispatcher mechanism. It's working quite well.

3. I can add new portlets or remove others dynamically without affecting the
Portal servlet.

4. Each portlet has access to the user's httpsession for state information.

I haven't run across any disadvantages...this is where you come in. Am I
missing anything big here, or are there any circumstances on other servlet
engines that may affect the design?


View raw message