My first post, so go easy on me.
I'm looking for advice on organising and referencing third party jars for use in my j2ee web application. The jars I need to organise and reference are the JWSDP-2.0 JAXB api jars.
I'm using Eclipse and Tomcat 5.5. My web app exchanges XML with a web service, and therefore needs to do some XML marshalling and unmarshalling using the JAXB api's in JWSDP-2.0.
I've downloaded JWSDP-2.0 and installed to my PC. I'm now trying to figure out the best way to make the necessary jar files contained therein available to my web app within eclipse on my machine, and also within Tomcat both on my machine and the eventual test and production servers.
I started off just copying the .jar files to the WEB-INF/lib folder of my project. This meant the jar files would now be exported in the .war when deploying to Tomcat. However, I don't like this because the jar files come from a few different libraries in JWSDP-2.0, and copying them like this meant the were all just tossed in together, rather than nicely seperated as JAXB, JAXP, SAAJ etc. Also, there are some name clashes, eg, my web app already contains older xml parsing jars such as xalan.jar which are already used by a different part of the web app.
I then removed all these jars, and created a series of user libraries within eclipse, eg "jwsdp-2.0_jaxp", "jwsdp-2.0_jaxb" which reference the jars from their locations in the WSDP-2.0 instal. This works fine as far as compliing my web app in eclipse goes, but I now need to make these jars available to Tomcat and I'm a bit stuck there on the best way to do this.
So, at a basic level my question is how do I get jar files referenced in Tomcat?
More generally, I'm looking for some advice on best practice for referencing and including third party jars in a project with an eye to smooth deployment to servers.
If anybody can recommend any good articles/books/resorces on code organisation and deployment that would help me learn best practice for this sort of scenario that would be great
Cheers in advance.