Adding Jar Files
(Difference between revisions)
Line 1: | Line 1: | ||
There are several ways to add jar files to opencms, to be used in your jsp code. | There are several ways to add jar files to opencms, to be used in your jsp code. | ||
− | The simplest way is to add them to the Tomcat library directory, then restart Tomcat. This is good for jar files that will be used by many different webapps. | + | The simplest way is to add them to the Tomcat library (common\lib) directory, then restart Tomcat. This is good for jar files that will be used by many different webapps. |
You can also add jar files to the opencms library file, and restart Tomcat. The path would be something like tomcat\webapps\opencms\WEB-INF\lib. | You can also add jar files to the opencms library file, and restart Tomcat. The path would be something like tomcat\webapps\opencms\WEB-INF\lib. | ||
Finally, if you want your module to be self-contained, you can create a lib directory in your module, and upload the jar file there. However, then you must export your module, then re-import it. This has to do with how the classpaths are configured when the modules are imported. You will probably also have to restart Tomcat again. | Finally, if you want your module to be self-contained, you can create a lib directory in your module, and upload the jar file there. However, then you must export your module, then re-import it. This has to do with how the classpaths are configured when the modules are imported. You will probably also have to restart Tomcat again. |
Revision as of 17:18, 13 June 2007
There are several ways to add jar files to opencms, to be used in your jsp code.
The simplest way is to add them to the Tomcat library (common\lib) directory, then restart Tomcat. This is good for jar files that will be used by many different webapps.
You can also add jar files to the opencms library file, and restart Tomcat. The path would be something like tomcat\webapps\opencms\WEB-INF\lib.
Finally, if you want your module to be self-contained, you can create a lib directory in your module, and upload the jar file there. However, then you must export your module, then re-import it. This has to do with how the classpaths are configured when the modules are imported. You will probably also have to restart Tomcat again.