Instead of you putting all the jar files in the WEB-INF/lib folder
I would suggest that create a directory structure for libraries aoutside
WEB-INF
Advantages of this is this approach is cleaner and easily mantainable
as
You can add any new libraries with minimum of effort
e.g the directory structure may look like
Application
libraries
struts
hibernate
Web-inf
lib
classes
And then use ant to include the jars in the classpath. All the web
containers garantee that if you
put the path of all the libraries using the manifest.mf (which is
created when you create ur
Application's WAR file) then the web container will include them in ur
application's classpath
A sample ant target for including the path of libraries in manifest.mf
is given below
<jar
basedir="${jar.dir}"
jarfile="myweb.war"
excludes="**/*"
update="true">
<manifest>
<attribute
name="Class-Path"
value="${project.manifest.classpath}"/>
</manifest>
</jar>
Where ${project.manifest.classpath} contains the path of all the
libraries. This has to be relative to web application root and not
absolute path
myweb.war -- the application's war file
${jar.dir} -- the directory from which to jar the files
Please revert to me in case you require any other details
Thanks,
Satish Kataria
-----Original Message-----
From: Riyad Kalla [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 9:29 AM
To: Struts Users Mailing List
Subject: Semi-OT: Organizing WEB-INF/lib dir...
Quick question for the people more versed in web apps than me, can you
organized your libs in your WEB-INF/lib dir into separate sub dirs? I
ask because my project is using Struts and Hibernate right now, and
there is a such a mish-mash of JARs forming in my WEB-INF/lib dir, that
its hard for me to upgrade the right jars when a new release comes out.
I'd like to have something like:
WEB-INF/lib/struts
WEB-INF/lib/hibernate
or something to that extent. Can I do this?
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]