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:
- Select the WEB-INF/lib directory as the target destination
when you build the JAR file.
- Create the JAR file anywhere in the filesystem, then copy and paste it into
the desired directory.
- Right-click the WEB-INF/lib directory and choose choose Add
JSP Tag Library
Find in Tag
Library Repository from the contextual menu.
- Use your operating system file manager to copy and paste the JAR file into
the WEB-INF/lib directory.
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
- In the main menu, choose Tools
Options.
- Expand IDE Configuration, expand System, and expand Filesystems Settings.
- Right-click Java Libraries and choose New
Archive
Files.
- Use the File Chooser to select the JAR file and click Finish.
- (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