You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gwenael Treguier <gw...@altavista.fr> on 2000/05/28 16:44:18 UTC
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.0, Blackdown jdk1.2.2RC4)):
- In the ~/.bashrc (it's my default shell...)
COCOON=/usr/local/cocoon
export USERNAME ENV PATH COCOON ...
- In the "userconfig.sh" ($J2EE_HOME/bin/)
J2EE_CLASSPATH=$COCOON/bin/cocoon.jar:$COCOON/lib/fop_0_12_1.jar:$COCOON/lib/xalan_1_0_1.jar:$COCOON/lib/xerces_1_0_3.jar
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)
CPATH=$CLASSESDIR:$LOCALEDIR:$J2EE_CLASSPATH:$J2EEJARS...
- Launch J2EE ($J2EE_HOME/bin/j2ee)
- 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.
- Then, you have to modify the cocoon.properties
processor.xsp.repository = ../repository
- finally, you have to make some security permission modification :
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.
Bye.
Internet et mail gratuit AltaVista http://www.altavista.fr