Hi all, I'm fairly new to Servlets/JSP/Struts and I'm trying to set up a
basic generic framework that I can use to build webapps on. The MVC pattern
makes a lot of sense to me and Struts seems to be a very well thought out
implementation, but I have a question regarding application architecture.
One of the great advantages of server-side java is that some resources can
be shared at the application level, as an example I have a servlet which
loads on startup and instantiates a connection pool class and stores it in
the application space. My question is: if I forward my requests to
non-servlet beans (through Action classes, in this case) for business-logic
processing, how can I make those application-level resources (or
Session-level resources) available to beans further on down the chain? Is
possible/advisable to pass a reference to the ServletContext down the line?
I am very interested to know what you think, and I would very much
appreciate any articles or tutorials which have examples of dealing with
this subject.
Cheers,
***********************************
Mac Ferguson,
Developer,
NKaos Interactive Media (http://www.nkaos.com),
579 Richmond Street West, Suite 400
Toronto, ON
M5V 1Y6
(Phone) (416)504.8931 x316
(Fax) (416)504.8472
***********************************