[opencms-dev] problem of writing java bean class on OpenCms.

Christian Steinert christian_steinert at web.de
Mon Mar 9 15:50:11 CET 2009


> thanks for your information. i tried to find in book the way of 
> importing java files written on eclipse, but couldn't get it. if you 
> can explain me briefly how to do that in OpenCms, i will really 
> appreciate your help.
> 
> Thank you.

There are two ways to get your code into opencms:
First way (the clean way)
0. Program in Eclipse whatever Java code you like; import the Jar files into eclipse so that you can use things like the CmsObject class in your Java code
1. Create a jar that contains your classes
2. Create a module in opencms
3. Upload the jar file into opecms: the jar file must be placed inside of opencms into the lib folder of your opencms module 
4. Publish your module folder in opencms
5. You may need to restart opencms after publishing has finished (this depends on how your servlet container is configured).

___
Second way (quick qnd dirty)
1. Create a jar that contains your classes
2. Copy your jar file into the WEB-INF\lib folder of your opencms installation (this time, this is a folder in the real file system, not inside of the opencms filesystem).
3 You may need to restart opencms after publishing has finished (this depends on how your servlet container is configured).

Hope that helps.
Best regards
Christian


> 
> On Sun, Mar 8, 2009 at 11:03 PM, Christian Steinert <christian_
> steinert at web.de> wrote:
> Saroj Bhatarai ha scritto:
> 
> > Hi all,I am new to OpenCms and i am trying to do one one sample 
> project from
> > book OpenCms 7 development. It says to write a custom java class 
> when making
> > project on OpenCms, but i am confused where to write that customer 
> java
> > class. I can only create new html, jsp, etc file from OpenCms 
> explorer
> > window. So, i would like to know who to create this java class and 
> in which
> > folder i have to put this file.
> >
> You write that class outside of opencms - usually with a Java
> development environment like Eclipse.
> You do this by importing the opencms classes into your project and
> writing java classes. When you are finished with this, you can import
> your classes into an opencms module and use them there.
> 
> The opencms book has examples on how to get started with eclipse for
> things like that
> 
> Best Regards
> Christian
> 
> _______________________________________________
> 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
> 
> -- 
> Bhatarai, Saroj.
> _______________________________________________ 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


_______________________________________________________________________
Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a




More information about the opencms-dev mailing list