You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by RathinaGanesh MeenakshiSundaram <ra...@gmail.com> on 2006/08/25 19:08:30 UTC

Struts war files

Greetings,

I have an ear project and have the following structure

EAR
  |----- EJB
  |----- WAR
          |-------- WEB-INF (Which has all the Struts jars...etc)

Now, I want to include another web project(with a different context) within
the same EAR project and need a structure like the following

EAR
  |----- EJB
  |----- WAR 1
          |-------- WEB-INF (Which has all the Struts jars...etc)
  |----- WAR 2
         |--------- WEB-INF (Struts jars...etc)

The problem is, I don't want to package the struts jar twice within the same
ear file and I know, I can do it with ant build, instead of using a regular
eclipse build. Is there any other way ? Other than ANT build ???
Another problem,
Can I create another web project 2 without including these struts jar files,
but still making use of the struts jar in web project 1.
How can I make a utility jar files that struts.jar etc and make both web
project 1 and 2 point to the utility jars.

Thanks in advance.
-Ganesh

Re: Struts war files

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
I would suggest putting your JARs at the EAR level (root of the EAR) and 
reference them as utility JARs from the WAR.  We've actually started to 
do this for ALL JARs in our EAR projects, just to avoid potential 
classloader issues in Websphere.

Frank

RathinaGanesh MeenakshiSundaram wrote:
> Greetings,
> 
> I have an ear project and have the following structure
> 
> EAR
>  |----- EJB
>  |----- WAR
>          |-------- WEB-INF (Which has all the Struts jars...etc)
> 
> Now, I want to include another web project(with a different context) within
> the same EAR project and need a structure like the following
> 
> EAR
>  |----- EJB
>  |----- WAR 1
>          |-------- WEB-INF (Which has all the Struts jars...etc)
>  |----- WAR 2
>         |--------- WEB-INF (Struts jars...etc)
> 
> The problem is, I don't want to package the struts jar twice within the 
> same
> ear file and I know, I can do it with ant build, instead of using a regular
> eclipse build. Is there any other way ? Other than ANT build ???
> Another problem,
> Can I create another web project 2 without including these struts jar 
> files,
> but still making use of the struts jar in web project 1.
> How can I make a utility jar files that struts.jar etc and make both web
> project 1 and 2 point to the utility jars.
> 
> Thanks in advance.
> -Ganesh
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Author of "Practical Ajax Projects With Java Technology"
  (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org