I understand it makes no sense to share a whole webapp in Tomcat.

What about sharing a singleton across all Tomcat webapps? I want my main webapp to call a method on that shared singleton in order to provide a factory (...getInstance().setFactory()). This factory should be retrieved by webapps using that singleton (....getFactory()). I know I have to put that singleton (in a jar file) into the $CATALINA_HOME/lib directory. How do I access the singleton from within my webapps after that? I guess I have to touch the web.xml somewhere. However, the first call must set the factory (the main webapp will do that)... all following calls shall be able to access the factory.


----- Original Message ----- From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Friday, June 15, 2007 12:08 AM
Subject: RE: Using shared Spring Webapp in Tomcat 6


From: Kevin Wilhelm [mailto:[EMAIL PROTECTED]
Subject: Using shared Spring Webapp in Tomcat 6

For Tomcat 6 there is a folder called "$CATALINAHOME/lib"
that is said to be used for that kind of stuff.

No, the $CATALINA_HOME/lib directory is for classes common to all
webapps, not any individual webapps.  Each webapp is normally deployed
in its own directory under the <Host> appBase (typically
$CATALINA_HOME/webapps).

1.) Does it work to create a war file from my services webapp
and put it into the lib directory? Is this the way to go?

No.

2.) Furthermore: Where do I start with my JSP/JSF view
webapp? I assume I have to access the SessionFacade somehow.
I will have to access the logic web app from within my view-webapp.

If your "logic" webapp is just that - no presentation capabilities -
then it's not really a webapp, is it?  Sounds like you haven't really
thought through the application architecture here.

This may well be more of a Spring topic than a Tomcat one.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to