[opencms-dev] Add new resources type ??? (bis)
Vincent Hanniet
vhanniet at free.fr
Thu Mar 11 16:04:02 CET 2004
opencms-mailing at astron.biz wrote:
> Vincent,
>
> Of course, I start from scratch each time.
> For the moment I have imported the opencms sources in my WSAD.
> I delete the webapps in Tomcat
> I delete the mysql database
> I make my modif, generate and deploy a new war file from my WSAD
> I restart Tomcat
> I make the ocsetup again
>
> So a long process after each modification.
> It is why I am disapointed, and I will forget this product If I do not find
> any help on it.
OK. Maybe you can try another way :
* Get the "light" binary for OpenCms 5.0.1 directly from opencms.org
* Install opencms.war from Tomcat (4.1.27 is the version I use too)
* Replace xercesImpl.jar by xerces-1_4_4.jar
Here you have a clean install. From here, wathever you do in the scope
of your new type change, you don't have to install OpenCms again.
Now you can create two modules (with all default options) :
* com.opencms.file
* com.opencms.workplace
Then you can upload your CmsResourceTypetechmanDetail.class in
/system/modules/com.opencms.file/classes/com/opencms/file, and
CmsNewResourcetechmanDetail.class in
/system/modules/com.opencms.workplace/classes/com/opencms/workplace.
Publish these two files. You can check that they are correctly published
: you must find them in
webapps/opencms/WEB-INF/classes/com/opencms/file (..../workplace).
Put your file techmanDetail in /system/workplace/restypes.
Update the registry.xml file with the declaration for your new type.
Restart Tomcat.
As you see, to upgrade the "core" classes for your new type, you will
not have to install OpenCms again. You can manage upgrades just with the
module mechanism and/or uploading the classes into the right folders.
> For additionalresources, I must select org.opencms.default
> For the value I can enter: C:\Program
> Files\jakarta-tomcat-4.1.27\webapps\opencms\WEB-INF\ocsetup\vfs\system\workp
> lace\restypes\techmanDetail
> And type is string
Here you have to create your own module, eg : com.techman.detail. Then
put your file techmanDetail into /system/workplace/restypes. Then enter
"/system/workplace/restypes/techmanDetail" into the field "Value" for
the property "additionalresources".
You can "export" your module : it goes under
webapps/opencms.WEB-INF/export/modules and is named
com.techman.detail.zip. This zip file may be upload from the Module
Management of another opencms install. If you want to try this, don't
forget to export/upload also the two others modules : com.opencms.file
and com.opencms.workplace as the three modules are needed.
Tell me if it works at last !
Vincent
More information about the opencms-dev
mailing list