when you deploy a j2ee application one of the proper
patterns you can use for design is MVC (Model, View,
Controller) refer to design pattern by gang of 4 for
more details on this, j2ee has a strong support for
MVC in type 3 j2ee applications MVC will be
implemented like this:
Model : EJB (session and entity)
View: JSB (&some times with taglib and servlet)
Controller: Servlet
in short Controllers take care of the connection
between model and view, one of the patterns for
controller is front controller in which all http
request are given into one servlet (usually with
multiple instances) and this servlet takes care of
authorization, authenticaion and dispatchin of all
events in the system by use of other helper classes
which are usually a log manager, application resource
manager and a dispatcher.
to see more details and variations of these patterns
download and install TogetherJ and apply j2ee front
controller pattern and see the varations of pattern in
UML.