Adding Web library projects

Web library projects allow you to associate Java™ projects with "virtual" JAR files in a Web project's WEB-INF/lib directory. You can reference JAR files that exist elsewhere in the Enterprise Application project that contains your Web project, if they are in the Web project's build path, and avoid the need to explicitly copy these JAR files into the project's lib folder before you publish the Web application to a server.

Currently, Web Library projects are supported only when testing in the WebSphere test environment or remotely publishing to a WebSphere® Application Server. After these associations are made, you must restart and republish the server for the changes to take effect.

To set up these associations:

  1. Right click on a Web project and select Properties from the pop-up menu.
  2. Expand J2EE Module Dependencies
  3. Click Web Libraries
  4. Set up your associations in the Web Libraries window
  5. Click OK when you are done.