• No replies
1 Post

Pinned topic Sharing JAX-RS jar files between multiple web applications

‏2011-12-19T10:20:35Z |

A described in the Web 2.0 FeP documentation (, the following jar files are supposed to be packaged in the WAR file (WEB-INF/lib folder) of the web application doing JAX-RS:

  • jsr311-api.jar
  • commons-lang.jar
  • slf4j-api.jar
  • slf4j-jdk14.jar
  • ibm-wink-jaxrs.jar

In our case, we have many (a dozen) WAR files that are deployed separately and we would like to avoid duplicating these jar file between all these WAR files without having to package all of them into a single EAR files (we still want to keep separate deployment packages). Hence the following questions:

  • WAS 8.0 has built-in JAX-RS support. Does it mean that with WAS 8.0, I do not have to package any of these jar files into my WAR files? The WAS 8.0 JAX-RS documentation ( and is definitely suggesting that it is not needed any longer and I am assuming that it is correct even if I install the latest Web 2.0 FeP (

  • For WAS 7.0, can we put these jar files into a shared library or even the WAS profile classes folder so they are shared by all the WAR file? Our initial testing is suggesting that it is working fine but I wanted to make sure that this is a supported mechanism.

Our actual concern is that we suspect that the IBMRestServlet class need to have visibility to the web application JAX-RS classes (the classes we created that are using JAX-RS annotations). If this is the case and if the JAX-RS jar files are higher in the WAS class loader hierarchy (profile classes folder or shared library) while the application classes are available only in the WAR file, is there a risk that the IBMRestServlet class will not be able to see/load the application classes?