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

Jack Bakker jbakker at iable.ca
Mon Mar 9 15:59:51 CET 2009


3d way:

in your Eclipse project, create a folder called 'opencms_sync' and set your
Java Build Path, default output folder to 'projectname/opencms_sync/classes'

then set up WebDav to sync with the opencms module (wiki has info on
configuring WebDav)

publish through opencms, restart container if needed (not always necessary
if running in Eclipse - tomcat (or whatever) in debug mode)

--
with the above approach, you can sync not only Java files, but all jsp and
other files in the module; manage all custom stuff in a module through
Eclipse, leaving site content management for the /sites folder

................
Jack Bakker
 

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of 
> Christian Steinert
> Sent: Monday, March 09, 2009 10:50 AM
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] problem of writing java bean class 
> on OpenCms.
> 
> 
> > 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
> 
> 
> _______________________________________________
> 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
> 




More information about the opencms-dev mailing list