[opencms-dev] help with jar file
Pavel Peringer
pavel.peringer at qbizm.cz
Sat Jun 17 10:07:53 CEST 2006
Hello
You wrote that you have created module "infrastructure" (lib and classes
folder) in system/module
and I hope that you have created the module itself from the Module
administration to :-)
After that you have module package only in VFS and the best way to
deploy this module is from
Module administration again and on your module choose Export. The export
path is
$CATALINA_HOME\webapps\opencms\WEB-INF\packages\modules
where you have zipped module folder with module version suffix.
This file is installable to any other Opencms by Module Import with HTTP.
But if you export module or not, allways when you are using "dynamic"
things like jars and classes
it is necessarily <search.py?lg=en_cz&wd=necessarily> to restart/reload
servlet context in order to let "know" Tomcat or any server
about you classes and jars, because publishing only does not do this.
Maybe you are using Eclipse with Tomcat plugin for *.java development
and Eclipse is able
to exchange "old" version of class file to new one without Tomcat
restart. And as I wrote
publishing VFS files does not do the same.
And as Jon right wrote the jar file MUST have same name as you module
package.
Example
/system/modules/cz.test.www/lib/cz.test.www.jar
/system/modules/cz.test.www/classes/cz/test/www/Some.class
Then in your JSP use import cz.test.www.* and JSP should be working.
HTH
Pavel Peringer
> What's your jar file called? It's been a while since I worked this
> out, but from memory it has to be named <modulename>.jar.
> Jon
>
> ------------------------------------------------------------------------
> *From:* opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] *On Behalf Of *Jonathon Mar
> *Sent:* 16 June 2006 23:25
> *To:* opencms-dev at opencms.org
> *Subject:* [opencms-dev] help with jar file
>
> Hi,
>
> I want to import java packages and java classes to use in my jsp
> pages. Here’s what I did:
>
> 1. Create a module for my site
> 2. Create a folder called “lib” and a folder called “classes” under
> that module
> 3. Created 2 export points to map from those 2 folders to
> $CATALINA_HOME\webapps\opencms\WEB-INF\lib and
> $CATALINA_HOME\webapps\opencms\WEB-INF\classes
> 4. Upload all my java classes into the “classes” folder and jar
> files into the “lib” folder in the opencms VFS
> 5. Publish my project
>
> So the problem is that the java class loader can find the java classes
> I put in the “classes” folder, but isn’t able to locate a class file
> from the jar, resulting in a ClassDefNotFound error. The jar file
> looks to have been copied to the file system upon publish, and upon
> checking the contents of the jar, all java classes are there. Did I
> miss a step somewhere? Any help is appreciated. Thanks!
>
> -Jon
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>This mail is sent to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://lists.opencms.org/mailman/listinfo/opencms-dev
>
--
Pavel Peringer Qbizm technologies, a.s.
programator ... the art of software.
____________________________________________________________________
www.qbizm-technologies.cz www.qbizm.cz www.qbizm-services.cz
More information about the opencms-dev
mailing list