<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-7" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Dear all,<br>
<br>
Am I forgetting something? I totally disagree with your approach to
directly put your class files in the server's filesystem. Why to
bother? OpenCms will do it for you automatically when you publish your
class file or jar file and of course restart your servlet container
(e.g. Tomcat). From the OpenCms Module documentation:<br>
<br>
-----------------<br>
<p>In case you either added the <strong> classes/</strong>folder
and/or the <strong> lib/</strong> folder on module creation, these
folders are additionally created:</p>
<pre class="code">/system/modules/org.opencms.mymodule/classes/com/opencms/mymodule/
/system/modules/org.opencms.mymodule/lib/</pre>
<ul>
<li>Inside the <font face="Monospace">classes/</font> subfolder, an
entire subfolder structure with the package name of your module is
created. All subfolders of the classes/ subfolder and their contents
will be exported to <font face="Monospace">WEB-INF/classes/</font>
when your module is published. For example you could place a
localization Java resource bundle in the module subfolder <font
face="Monospace">classes/org/opencms/mymodule/my.properties</font>.</li>
<li>In the <font face="Monospace">lib/</font> subfolder you could
place any Java archives (JAR) that are to be shipped with your module.
All contents of the <font face="Monospace">lib/</font> subfolder will
be exported to <font face="Monospace">WEB-INF/lib/</font> when your
module is published.</li>
</ul>
-----------------<br>
<br>
What are you going to do in case you want to distribute your module
to another OpenCms instance? You will have to provide an additional
archive with your class files and give detailed instructions where they
should placed. Isn't it more confusing than to give a single module zip
file and have OpenCms to take care for the rest? I've already developed
a module having in the classes folder property localisation files and
all the classes in a jar file inside the lib folder. I haven't faced a
single hitch in the whole development process.<br>
<br>
Regards,<br>
Panos<br>
<br>
Jonathan Woods wrote:
<blockquote cite="mid003301c6478b$eb648ee0$0600a8c0@COMPUTER2"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.2802" name="GENERATOR">
<div dir="ltr" align="left"><span class="396381617-14032006"><font
color="#0000ff" face="Arial" size="2">Joachim -</font></span></div>
<div dir="ltr" align="left"><span class="396381617-14032006"></span> </div>
<div dir="ltr" align="left"><span class="396381617-14032006"><font
color="#0000ff" face="Arial" size="2">The question is made more
complicated by the status of your module. If you're developing it from
scratch, and just putting JSP, XSD, HTML and Java (class) files
underneath /system/modules in directories following the normal OpenCms
module structure, that's fine - but until you tell OpenCms 'officially'
that it's a module, it won't put the /system/modules/<your module
name>/classes directory in the runtime classpath - so your classes
won't be found. Same goes for jar files in /system/modules/<your
module name>/lib.</font></span></div>
<div dir="ltr" align="left"><span class="396381617-14032006"></span> </div>
<div dir="ltr" align="left"><span class="396381617-14032006"><font
color="#0000ff" face="Arial" size="2">I think the best way to develop
your module is to put your class files in <opencms
root>/WEB-INF/classes, which is always in the OpenCms classpath;
then once things are stable and you are ready to package up your module
as a module, you can put them instead in the directory above. Other
people may have different ways of working.</font></span></div>
<div dir="ltr" align="left"><span class="396381617-14032006"></span> </div>
<div dir="ltr" align="left"><span class="396381617-14032006"><font
color="#0000ff" face="Arial" size="2">Tip: beware old versions of your
classes being picked up from odd places. I'd suggest including a build
timestamp in your Java code and spitting it out in the log or in a test
area of your web pages, just so you can be sure new stuff is being
picked up; and of course if OpenCms has already loaded a class then
you'll need to restart Tomcat for it to pick up any new version.</font></span></div>
<div dir="ltr" align="left"><span class="396381617-14032006"></span> </div>
<div dir="ltr" align="left"><span class="396381617-14032006"><font
color="#0000ff" face="Arial" size="2">Jon</font></span></div>
<div dir="ltr" align="left"><span class="396381617-14032006"></span> </div>
<div dir="ltr" align="left">
<hr tabindex="-1"></div>
<div dir="ltr" align="left"><font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a>
[<a class="moz-txt-link-freetext" href="mailto:opencms-dev-bounces@opencms.org">mailto:opencms-dev-bounces@opencms.org</a>] <b>On Behalf Of </b>Panos
Kavalagios<br>
<b>Sent:</b> 14 March 2006 15:48<br>
<b>To:</b> The OpenCms mailing list<br>
<b>Subject:</b> Re: [opencms-dev] opencms 6 | where to put class files<br>
</font><br>
</div>
Joachim,<br>
<br>
You can either place your class file in:<br>
<br>
<b>my.mod.submodule/classes/my/mod/submodule</b><br>
<br>
or as a jar file in:<br>
<br>
<b>my.mod.submodule/lib</b><br>
<br>
Regards,<br>
Panos<br>
<br>
Joachim Zittmayr wrote:
<blockquote
cite="mid1142350742.7309.256594754@webmail.messagingengine.com"
type="cite">
<pre wrap="">hello ocms.dev.list!
where do i have to put (new) class files?
can i put them just under a module classes folder (e.g.
my.mod.submodule/classes/classname.class)?
what else do i have to consider? it seems as if the newly created class
is not "recognized". i added a method, but i can't use it in a e.g.
jsp-template (method foo(String) is undefined for the type bar)
thanks 4 ur help!
joachim
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Panagiotis Th. Kavalagios
Electrical & Computer Engineer
European Dynamics S.A.
Athens, Hellas
Tel: +30-210-8094500
</pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
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
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Panagiotis Th. Kavalagios
Electrical & Computer Engineer
European Dynamics S.A.
Athens, Hellas
Tel: +30-210-8094500
</pre>
</body>
</html>