cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gwenael Treguier <gtreg...@inexware.fr>
Subject Re: Cocoon in J2EE
Date Thu, 16 Nov 2000 15:05:46 GMT
Updated "Install Cocoon on the Application Server "J2EE" version 1.2.1"
Hello,
Here is the installation instructions for the j2ee application server (I am 
using Linux (Mandrake 7.1, Blackdown j2sdk1.3)):
  - In the ~/.bash_profile (it's my default shell...)
  JAVA_HOME=/usr/local/j2sdk1.3
  COCOON=/usr/local/cocoon-1.8.1-dev
  J2EE_HOME=/usr/local/j2sdkee1.2.1
  export USERNAME ENV PATH COCOON J2EE_HOME JAVA_HOME
  - In the "userconfig.sh" ($J2EE_HOME/bin/)
  
COCOONJARS=$J2EE_HOME/lib/system/cocoon.jar:$COCOON/lib/fop_0_13_0.jar:$COCOON/lib/turbine-pool.jar
    (I put cocoon.jar with system jar because of security problems cf 
server.policy)
  J2EE_CLASSPATH=$COCOONJARS:$DBSJARS
  export J2EE_CLASSPATH
  - Apply the patch indicates in $COCOON/docs/faq.html for tomcat (How come 
Cocoon doesn't work on Tomcat 3.0?)
    - If I suppose you have the source of Tomcat,
      extract the file org/apache/tomcat/core/RequestMapper.java in the 
$J2EE_HOME/lib
      make a bach file to compile it (org/apache/tomcat/core/compil.sh)
        #!/bin/sh
        TOPDIR=$J2EE_HOME/lib
        CPATH=.:$TOPDIR:$TOPDIR/j2ee.jar
        JAVACMD="$JAVA_HOME/bin/javac "
        $JAVACMD -classpath "$CPATH" -d "$TOPDIR" RequestMapper.java
      compile...
      update the j2ee.jar
        jar uvf j2ee.jar org/apache/tomcat/core/RequestMapper.class
  - To avoid a problem with old packages define in j2ee.jar (org.xml.sax, 
org.w3c.dom) , change the declaration of the classpath in "setenv.sh" 
($J2EE_HOME/bin/setenv.sh)
    
XMLJARS=$J2EE_HOME/lib/system/xerces_1_2.jar:$J2EE_HOME/lib/system/xalan_1_2_D02.jar
    CPATH=$CLASSESDIR:$LOCALEDIR:$XMLJARS:$J2EEJARS:...
    
    (JAVACMD="$JAVA_HOME/bin/java -server ...)
  - Launch J2EE ($J2EE_HOME/bin/j2ee)
  - Then, you have to modify the cocoon.properties
     processor.xsp.repository = ./repository (if you launch ./bin/j2ee 
-verbose)    
     processor.xsp.repository = ../repository (if you launch ./j2ee -verbose)
  - Before Launching the deployment tool, you have to extract the 
Cocoon.class (i.e.,$COCOON/classes/org/apache/cocoon/Cocoon.class). (I don't 
know if this step is necessary, but I can't figure out another way.)
  - Launch the deployment tool :
    Create a New application (Cocoon.ear)
    Create a New Web application (CocoonWAR)
      * click on the add Button
          - choose the directory
             browse to select the $COCOON/classes/ directory,
             and then add the org.apache.cocoon.Cocoon class.
	     browse again to select the $COCOON/conf directory,
	     and then add the cocoon.properties.
          - click next and choose directory
             browse to select the $COCOON directory, 
          - add the directory you want in your web application (samples, 
xdocs, skins, docs, ...)
      * click on the Mime Mapping button and add
         .xml  text/xml
      * click on finish and follow the next step
         You want to describe a Servlet.
      * next, enter the display name
         org.apache.cocoon.Cocoon
      * next, enter the initialization parameter
         properties       /WEB-INF/classes/cocoon.properties
      * next, enter the URL mapping
          *.xml
      * skip all the following steps.
      * choose the context root associated to your web application.
        i.e cocoon (you 'll then launch cocoon with the following url 
http://localhost.localdomain:8000/cocoon/Cocoon.xml) 
      * select Tools, Deploy application.
  - finally, you have to make some security permission modification (only, if 
you don't put cocoon.jar in $J2EE_HOME/lib/system: 
policytool $J2EE_HOME/lib/security/server.policy
      * Add policy entry :
          CodeBase
          file:$COCOON/bin/cocoon.jar
      * Add permissions :
          - java.lang.RuntimePermission
            setFactory
          - java.lang.RuntimePermission
            createClassLoader
          - java.lang.RuntimePermission
            modifyThreadGroup
          - java.io.FilePermission
            ..${file.separator}repository
            read, write, delete, execute
          - java.io.FilePermission
            <<ALL FILES>>
            read
Hope it would help.
I still have a problem with mail sample (security exception), but I don't 
dare to send a mail (they are so busy).
Bye.
On Thursday 16 November 2000 07:13, you wrote:
> Hi all,
> 	I would like to ask how to install cocoon
> in the J2EE ???
> Yours,
> LUN
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

Mime
View raw message