Adding JAR Files to a Web Module

To use a JAR file in a web module, you must make the JAR file available to the IDE's class path and to the web server's class path. The easiest way to do this is to place the JAR file in the web module's WEB-INF/lib directory.

Use one of the following methods to add a JAR file to a web module:

The IDE separately mounts all JAR files in the WEB-INF/lib directory so that they are available to the IDE's class path.

An alternative to placing the JAR file in the WEB-INF/lib directory is to place the JAR file in the directory for the web server's shared libraries. Then do the following steps to add the JAR to the IDE's class path and code completion database.

To Add a JAR File in the Server's Shared Libraries Directory to the IDE Class Path

  1. In the main menu, choose Tools and choose Options.
  2. Expand IDE Configuration, expand System, and expand Filesystems Settings.
  3. Right-click Java Libraries and choose New and choose Archive Files.
  4. Use the File Chooser to select the JAR file and click Finish.
  5. (Optional) Click the << button in the Options panel to display the Project, User, and Default columns. Choose Define Here in the User column to add the JAR file to all of the project class paths.

Legal Notices