<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2838" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=237001409-15032006><FONT face=Arial
color=#0000ff size=2>Panos - you (and Christian) may well be right. But
the reason I stuff things directly in the server's filesystem during development
is because I have an automated Eclipse/Ant script which builds the whole app,
FTPs it to my server then kicks off a local script to copy files over.
When Java classes or JSPs have changed and I want to try out the new versions,
it takes one mouse click and about 30 seconds to make them availalbe, which is a
whole lot better than having to faff around publishing things. Of course,
I have to use the 'full' approach once things are stable.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=237001409-15032006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=237001409-15032006><FONT face=Arial
color=#0000ff size=2>Jon</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Panos
Kavalagios<BR><B>Sent:</B> 15 March 2006 08:34<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>
<DIV></DIV>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>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 content="MSHTML 6.00.2900.2802" name=GENERATOR>
<DIV dir=ltr align=left><SPAN class=396381617-14032006><FONT face=Arial
color=#0000ff 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 face=Arial
color=#0000ff 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 face=Arial
color=#0000ff 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 face=Arial
color=#0000ff 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 face=Arial
color=#0000ff 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 width="90%" SIZE=4>
_______________________________________________
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>