You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Qiqi Dong <qd...@swbell.net> on 2001/02/19 23:16:55 UTC

can I move struts.jar?

I have a problem need help.

I have many webapps. Everytime I update struts.jar, I have to do it for
every WEB-INFs, it's . I tried to place the struts.jar in Tomcat's lib, got
the following. Is there a way to have just one copy of struts.jar somewhere
for all the applications?


Re: can I move struts.jar?

Posted by Maya Muchnik <mm...@pumatech.com>.
As I know, now each application has to have struts.jar under its own WEB-INF.

Qiqi Dong wrote:

> I have a problem need help.
>
> I have many webapps. Everytime I update struts.jar, I have to do it for
> every WEB-INFs, it's . I tried to place the struts.jar in Tomcat's lib, got
> the following. Is there a way to have just one copy of struts.jar somewhere
> for all the applications?


Re: can I move struts.jar?

Posted by Incze Lajos <in...@mail.matav.hu>.
> > Hold a "master copy" of struts.jar and put only symbolic links to it
> > into your webapps/{app}/WEB-INF/lib (on unix - on windows I think
> > "alias" would work but don't know). If you are brave enough you
> > can try tomcat 3.3m1, which has a directory to hold jars shared by
> > more webapps. I think the same holds for tomcat4, too. Don't know
> > of other servlet containers what can be done there.          incze
> 
> There is such a directory in Tomcat 4.0 ($CATALINA_HOME/lib), but struts.jar will
> not work if you place it there -- among other things, the controller servlet
> class will be loaded from the shared class loader instead of your web app class
> loader, so that it will not be able to see any of the classes you actually store
> in WEB-INF/classes or WEB-INF/lib.
> 
> Always put struts.jar in the WEB-INF/lib directory of your webapps.
> 
> Craig McClanahan
> 

Sorry. It was REALLY not the first time that you had to put down
these words ("Always put struts.jar in the WEB-INF/lib directory
of your webapps"). I was too glad of that shared lib directories.
So, reamins the master copy with that links/aliases.       incze

Re: can I move struts.jar?

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Incze Lajos wrote:

> On Mon, Feb 19, 2001 at 04:16:55PM -0600, Qiqi Dong wrote:
> > I have a problem need help.
> >
> > I have many webapps. Everytime I update struts.jar, I have to do it for
> > every WEB-INFs, it's . I tried to place the struts.jar in Tomcat's lib, got
> > the following. Is there a way to have just one copy of struts.jar somewhere
> > for all the applications?
> >
>
> Hold a "master copy" of struts.jar and put only symbolic links to it
> into your webapps/{app}/WEB-INF/lib (on unix - on windows I think
> "alias" would work but don't know). If you are brave enough you
> can try tomcat 3.3m1, which has a directory to hold jars shared by
> more webapps. I think the same holds for tomcat4, too. Don't know
> of other servlet containers what can be done there.          incze

There is such a directory in Tomcat 4.0 ($CATALINA_HOME/lib), but struts.jar will
not work if you place it there -- among other things, the controller servlet
class will be loaded from the shared class loader instead of your web app class
loader, so that it will not be able to see any of the classes you actually store
in WEB-INF/classes or WEB-INF/lib.

Always put struts.jar in the WEB-INF/lib directory of your webapps.

Craig McClanahan



Re: can I move struts.jar?

Posted by Incze Lajos <in...@mail.matav.hu>.
On Mon, Feb 19, 2001 at 04:16:55PM -0600, Qiqi Dong wrote:
> I have a problem need help.
> 
> I have many webapps. Everytime I update struts.jar, I have to do it for
> every WEB-INFs, it's . I tried to place the struts.jar in Tomcat's lib, got
> the following. Is there a way to have just one copy of struts.jar somewhere
> for all the applications?
> 

Hold a "master copy" of struts.jar and put only symbolic links to it
into your webapps/{app}/WEB-INF/lib (on unix - on windows I think
"alias" would work but don't know). If you are brave enough you
can try tomcat 3.3m1, which has a directory to hold jars shared by
more webapps. I think the same holds for tomcat4, too. Don't know
of other servlet containers what can be done there.          incze