You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Russell Castagnaro <ru...@synctank.com> on 2000/05/20 18:05:12 UTC

Re: Doubt on Cocoon

Okey dokey,  I've put my comments inline, but I've checked and can't see anything blatantly obvious..
-rrc

bondiga@hotmail.com wrote:

> Hi! Russel,
>
> Thanks for reply and guiding me.
>
> The following is ur mail in the mailing list of successful installation of
> Cocoon with Weblogic.
>
> But I didn't understand few things please enlighten me on that.
> Please read the sentences starting with "Note:"
>
> 1) add the cocoon jars to your weblogic.clatt.path variable
>

Should be weblogic.class.path

>
> Note:The below sentence I didn't understand. What do u mean by 'xml-apache'
> to correct directory.
>
> (note you'll need to convert 'xml-apache' to the correct directory)
>

/xml-apache/cocoon is the diectory cocoon is in on my machine

>
> Note: I don't know how to use t3cofig, but I directly edited "StartWeblogic"
> and I will be adding my "startweblogic" file at the bottom.
>

That works fine, in 5.1 its t3config is now wlconfig, but if you are starting from a cmd or sh file you should edit that.

>
>     Windows: use the t3config utility as in (t3config
> -Dweblogic.class.path=\xml-apache\cocoon\bin\Cocoon.jar;\xml-apache\cocoon\bin\;\xml-apache\cocoon\bin\fop.0110.jar;\xml-apache\cocoon\bin\openxml.106-fix.jar;\xml-apache\cocoon\bin\xslp.19991017-fix.jar;<addidtional
> classes>)
>     Others use the -Dweblogic.class.path with the java runtime that invokes
> weblogic.
> -Dweblogic.class.path=c:\downloads\xml-apache\cocoon\bin\Cocoon.jar;c:\downloads\xml-apache\cocoon\bin\;c:\downloads\xml-apache\cocoon\bin\fop.0110.jar;c:\downloads\xml-apache\cocoon\bin\openxml.106-fix.jar;c:\downloads\xml-apache\cocoon\bin\xslp.19991017-fix.jar;<addidtional
> classes>
>
> Note: The second step I have configured properly.
>
> 2) register the cocoon servlet..
> #Cocoon processor
> weblogic.httpd.register.*.xml=\
>        org.apache.cocoon.Cocoon
> weblogic.httpd.initArgs.*.xml=\
>   properties=/xml-apache/cocoon/bin/cocoon.properties
>
> Russell I would like to explain u the steps I followed to configure Cocoon
> with weblogic
>
> 1. I downloaded cocoon.zip on to my desktop.
> 2. Extracted the cocoon to Weblogic folder. Cocoon-1.7.3 is a subfolder of
> weblogic.

You didn't have to do it in a subdirectory, but that works fine

>
> 3. Edited "startweblogic" .cmd file and I will be attaching it at the
> bottom.
> 4. Edited the weblogic properties file also and u will see this at the
> bottom.
> 5. Edited the Cocoon properties file also and u will see this at the bottom.
> 5. from command line I started Weblogicserver by 'startweblogic'.
> 6. Opened IE 5.0 and given an http request as
> 'http://127.0.0.1:7001/cocoon.xml.
> 7. Cocoon servlet is getting invoked and I getting an error as a dynamic web
> page as " Publishing Engine Cannot Be Established" etc etc
>
> Please help me out in solving the problem.
>
> Thanks a lot for the help.
>
> With Regards,
> Murali
>
>   I am copying StartWebLogic.cmd file and Weblogic Properties file and also
> Cocoon.propeties file.
>
>                           StartWeblogic file
>
> @echo off
> @rem $Id: //depot/dev/src451p/bin/startWebLogic.cmd#1 $
>
> set JDK_HOME=d:\jdk1.2.2
>
> if not exist license\WebLogicLicense.xml goto wrongplace
> if not exist weblogic.policy goto wrongplace
> goto checkJDK
>
> :wrongplace
> echo startWebLogic.cmd: must be run from the WebLogic installation
> directory. 1>&2
> goto finish
>
> :checkJDK
> if exist %JDK_HOME%\lib\nul goto setCP
> echo.
> echo The JDK wasn't found in directory %JDK_HOME%.
> echo Please edit the startWebLogic.cmd script so that the JDK_HOME
> echo variable points to the location of your JDK.
> goto finish
>
> :setCP
> %JDK_HOME%\bin\java -X > nul: 2>&1
> if not errorlevel 1 goto jdk12
> echo on
> set
> JAVACLASSPATH=%JDK_HOME%\lib\classes.zip;%JDK_HOME%\lib\rt.jar;.\classes\boot;.\eval\cloudscape\lib\cloudscape.jar
> goto runWebLogic
>
> :jdk12
> echo on
> set JAVACLASSPATH=.\classes\boot;.\eval\cloudscape\lib\cloudscape.jar
>
> :runWebLogic
> set
> WEBLOGICCLASSPATH=.\license;.\classes;.\myserver\serverclasses;.\lib\weblogicaux.jar;.\cocoon-1.7.3\bin\cocoon.jar;.\cocoon-1.7.3\lib\fop_0_12_1.jar;.\cocoon-1.7.3\lib\servlet_2_2.jar;.\cocoon-1.7.3\lib\stylebook-1.0-b2.jar;.\cocoon-1.7.3\lib\xalan_1_0_1.jar;.\cocoon-1.7.3\lib\xerces_1_0_3.jar;
> set PATH=.\bin;%PATH%
> %JDK_HOME%\bin\java -ms64m -mx64m -classpath %JAVACLASSPATH%
> -Dweblogic.class.path=%WEBLOGICCLASSPATH% -Djava.security.manager
> -Djava.security.policy=weblogic.policy weblogic.Server
>
> :finish
>
>                      Weblogic properties file (I am copying only
>                                           servlet part)
>
> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
> # USER-WRITTEN AND DEMO SERVLET REGISTRATIONS
> # --------------------------------------------------------
> # Set ACLs for these as desired
> # --------------------------------------------------------
>
> # Cocoon Servlet
>
> weblogic.httpd.register.*.xml=\org.apache.cocoon.Cocoon
> weblogic.httpd.initArgs.*.xml=\
>         properties=c:/weblogic/cocoon-1.7.3/conf/cocoon.properties
>
>                         Cocoon.properties file
>
> ##############################################################################
> #                          Cocoon Configuration file
> #
> ##############################################################################
>
> ##########################################
> # Global Configurations                  #
> ##########################################
>
> # Indicates whether or not Cocoon should be visible if
> # the requested URI equals the specified one.
> selfservlet.enabled = true
> selfservlet.uri = /Cocoon.xml
>
> # Indicates whether or not Cocoon should handle errors internally
> # and format the error and the exception stack trace to the client
> # or return the HTTP error code to the web server and let it handle it.
> handle.errors.internally = true
>
> # Indicates the log severity level
> #log.level = emergency
> #log.level = critical
> log.level = error
> #log.level = warning
> #log.level = info
> #log.level = debug
>
> ##########################################
> # XML Parsers                            #
> ##########################################
>
> # Apache Xerces 1.0.1+ (http://xml.apache.com/)
> parser = org.apache.cocoon.parser.XercesParser
>
> # SUN ProjectX TR2 (http://java.sun.com/xml/)
> #parser = org.apache.cocoon.parser.SunXMLParser
>
> # Indicate whether the XML file should be validated or not
> # this is turned off by default for faster operation.
> parser.validate = false
>
> ##########################################
> # XSLT Transformers                      #
> ##########################################
>
> # Apache Xalan (http://xml.apache.org/)
> transformer = org.apache.cocoon.transformer.XalanTransformer
>
> # James Clark's XT (http://www.jclark.com/)
> #transformer = org.apache.cocoon.transformer.XTTransformer
>
> ##########################################
> # XML Producers                          #
> ##########################################
>
> # For example, if you want to produce your XML template reading it from
> # the file system, using your producer, you should request the URI:
> #   http://your.site.com/your_XML_file.xml?producer=file
>
> # This is the request parameter used to identify the producer in the
> request:
> # (default value is "producer")
> producer.parameter = producer
>
> # The syntax for this is
> #   producer.type.xxx = full.class.name
> # where "xxx" is the producer indentier used in the request
> producer.type.file = org.apache.cocoon.producer.ProducerFromFile
> producer.type.request = org.apache.cocoon.producer.ProducerFromRequest
>
> # This is used in the example files
> producer.type.dummy = org.apache.cocoon.example.DummyProducer
>
> # When producer indication is present in the request
> # this configuration allows to map those requests to a particular
> # producer indicated here with its type.
> # NOTE: this type must present in the above map.
> producer.default = file
>
> ##########################################
> # XML Processors                         #
> ##########################################
>
> # These are used when the <?cocoon-process type="xxx"?> PI is present.
> # If no PI of that type is present, no processing is performed.
> # The syntax for this is
> #   processor.type.xxx = full.class.name
>
> # XSL Transformations (XSLT)
> processor.type.xslt = org.apache.cocoon.processor.xslt.XSLTProcessor
>
> # SQL Processor
> processor.type.sql = org.apache.cocoon.processor.sql.SQLProcessor
>
> # LDAP Processor
> # NOTE: you need to have the SUN JDNI API (jndi.jar) in your classpath
> # in order for this processor to work. Check the FAQ for more information.
> #processor.type.ldap = org.apache.cocoon.processor.ldap.LdapProcessor
>
> ##########################################
> # XSP Processor                          #
> ##########################################
>
> # eXtensible Server Pages Processor (XSP)
> processor.type.xsp = org.apache.cocoon.processor.xsp.XSPProcessor
>
> # supported languages
> processor.xsp.languages = java
>
> # support for the java language
> processor.xsp.java.processor =
> org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor
> processor.xsp.java.logicsheet = xsp-java.xsl
> processor.xsp.java.preprocessor =
> org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor
>
> # sets the repository where the compiled pages are stored.
> # NOTE: make sure the directory is readable. This directory is usually
> # relative to the web server's or to the servlet engine's. In case you're
> not
> # sure, use an absolute location.
> # WARNING: since this repository may contain information you want to remain
> # secret, we highly suggest that you protect the repository from untrusted
> # access, even read-only. Only Cocoon and the system administrators should
> # have access here.
> processor.xsp.repository = ./repository
>
> # Set the libraries associated with the given namespace.
> # Use the syntax:
> #   processor.xsp.logicsheet.<namespace-tag>.<language> = URL to file
> # where "URL to file" is usually starting with file:// if you locate
> # your custom library in your file system.
> #processor.xsp.logicsheet.context.java  =
> resource://org/apache/cocoon/processor/xsp/library/java/context.xsl
> #processor.xsp.logicsheet.cookie.java   =
> resource://org/apache/cocoon/processor/xsp/library/java/cookie.xsl
> #processor.xsp.logicsheet.global.java   =
> resource://org/apache/cocoon/processor/xsp/library/java/global.xsl
> #processor.xsp.logicsheet.request.java  =
> resource://org/apache/cocoon/processor/xsp/library/java/request.xsl
> #processor.xsp.logicsheet.response.java =
> resource://org/apache/cocoon/processor/xsp/library/java/response.xsl
> #processor.xsp.logicsheet.session.java  =
> resource://org/apache/cocoon/processor/xsp/library/java/session.xsl
> #processor.xsp.logicsheet.util.java     =
> resource://org/apache/cocoon/processor/xsp/library/java/util.xsl
> #processor.xsp.logicsheet.sql.java      =
> resource://org/apache/cocoon/processor/xsp/library/java/sql.xsl
>
> #### !!!!WARNING!!!! ###########
> # The DCP processor should be considered -deprecated- and we highly suggest
> # you to convert all of your DCP stuff into XSP pages that, in the future,
> # will totally replace DCP.
> #
> # Dynamic Content Processor (DCP)
> processor.type.dcp = org.apache.cocoon.processor.dcp.DCPProcessor
> #
> ################################
>
> ##########################################
> # XML Formatters                         #
> ##########################################
>
> # This is used when no <?cocoon?> PI is present to indicate
> # which MIME type to associate to the document.
> # NOTE: this type must present in the map below.
> formatter.default = text/html
>
> # These are used when the <?cocoon-format type="xxx/yyy"?> PI is present
> # The syntax for this is
> #   formatter.type.xxx/yyy = full.class.name
>
> # Full configurable formatters
> ###############################
>
> formatter.type.text/html        = org.apache.cocoon.formatter.HTMLFormatter
> formatter.type.text/html/loose  = org.apache.cocoon.formatter.HTMLFormatter
> formatter.type.text/xhtml       = org.apache.cocoon.formatter.XHTMLFormatter
> formatter.type.text/xhtml/loose = org.apache.cocoon.formatter.XHTMLFormatter
> formatter.type.text/xml         = org.apache.cocoon.formatter.XMLFormatter
> formatter.type.text/wml         = org.apache.cocoon.formatter.XMLFormatter
> formatter.type.text/plain       = org.apache.cocoon.formatter.TextFormatter
> formatter.type.model/vrml       = org.apache.cocoon.formatter.TextFormatter
> formatter.type.text/xslfo       =
> org.apache.cocoon.formatter.FO2PDFFormatter
> formatter.type.application/smil = org.apache.cocoon.formatter.XMLFormatter
>
> # You can modify the formatter's behavior by adding the following
> configurations
> # for each formatter you want to specifize. Note that even if two formatters
> # share the same class, they are will be seen as different entities,
> accessed
> # only by their types.
> #
> #   formatter.[type].MIME-type      = [formatter MIME type]
> #   formatter.[type].encoding       = [encoding type]
> #   formatter.[type].doctype-public = [public identifier]
> #   formatter.[type].doctype-system = [system identifier]
> #   formatter.[type].preserve-space = [whether to preserve space or not]
> #   formatter.[type].line-width     = [page width, wrapping column]
> #   formatter.[type].indent         = [numbers of spaces for tag indenting]
>
> # HTML 4.0 (strict)
> formatter.text/html.doctype-public = -//W3C//DTD HTML 4.0//EN
> formatter.text/html.doctype-system =
> http://www.w3.org/TR/REC-html40/strict.dtd
>
> # XHTML 1.0 (strict)
> formatter.text/xhtml.doctype-public = -//W3C//DTD XHTML 1.0 Strict//EN
> formatter.text/xhtml.doctype-system = xhtml1-strict.dtd
>
> # WML 1.1
> formatter.text/wml.doctype-public = -//WAPFORUM//DTD WML 1.1//EN
> formatter.text/wml.doctype-system = http://www.wapforum.org/DTD/wml_1.1.xml
> formatter.text/wml.MIME-type = text/vnd.wap.wml
>
> # VRML 97
> formatter.model/vrml.MIME-type = model/vrml
>
> # PDF
> formatter.text/xslfo.MIME-type = application/pdf
>
> # HTML 4.0 (transitional)
> formatter.text/html/loose.doctype-public = -//W3C//DTD HTML 4.0
> Transitional//EN
> formatter.text/html/loose.doctype-system =
> http://www.w3.org/TR/REC-html40/loose.dtd
> formatter.text/html/loose.preserve-space = true
> formatter.text/html/loose.encoding = UTF-8
> formatter.text/html/loose.indent = 1
> formatter.text/html/loose.line-width = 120
> formatter.text/html/loose.MIME-type = text/html
>
> # XHTML 1.0 (transitional)
> formatter.text/xhtml/loose.doctype-public = -//W3C//DTD XHTML 1.0
> Transitional//EN
> formatter.text/xhtml/loose.doctype-system = xhtml1-transitional.dtd
>
> # SMIL
> formatter.application/smil.doctype-public = -//W3C//DTD SMIL 1.0//EN
> formatter.application/smil.doctype-system =
> http://www.w3.org/TR/REC-smil/SMIL10.dtd
> formatter.application/smil.MIME-type = application/smil
>
> ##########################################
> # Cache Managers                         #
> ##########################################
>
> # the default cache
> cache = org.apache.cocoon.cache.CocoonCache
>
> # disable page caching
> #cache = org.apache.cocoon.cache.NoCache
>
> ##########################################
> # Object Storage Systems                 #
> ##########################################
>
> # the default object storage
> store = org.apache.cocoon.store.MemoryStore
>
> # Indicates how much free memory should always be available to the JVM. (in
> bytes)
> store.freememory = 1000000
>
> # Indicates what is the maximum heap size that your JVM can reach (in byte).
> # This is normally set using the -mx or -Xmx command line argument.
> store.heapsize = 60000000
>
> # Indicates the sleeping time for the background thread (in seconds)
> #store.interval = 10
>
> # Indicates the thread priority (1-10: 10 is maximum, 1 is minimum)
> #store.threadpriority = 10
>
> # Uncomment this to disable the background thread that manages the cache
> # overflow and leave this at request time.
> #store.usethread = false
>
> ##########################################
> # Language Interpreters                  #
> ##########################################
>
> # These are used by the DCP Processor
> interpreter.type.java = org.apache.cocoon.interpreter.java.JavaInterpreter
> #interpreter.type.ecmascript =
> org.apache.cocoon.interpreter.ecmascript.EcmaScriptInterpreter
> #interpreter.type.javascript =
> org.apache.cocoon.interpreter.ecmascript.EcmaScriptInterpreter
>
> # Indicates the default language if not specified in the DCP PIs
> interpreter.default = java
>
> # NOTE: see the DCP user guide for instructions on using ecmascript and the
> # packages required for this operation.
>
> ##########################################
> # User Agents (Browsers)                 #
> ##########################################
>
> # NOTE: numbers indicate the search order. This is very important since
> # some words may be found in more than one browser description. (MSIE is
> # presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...")
> #
> # for example, the "explorer=MSIE" tag indicates that the XSL stylesheet
> # associated to the media type "explorer" should be mapped to those browsers
> # that have the string "MSIE" in their "user-Agent" HTTP header.
>
> browser.0 = explorer=MSIE
> browser.1 = pocketexplorer=MSPIE
> browser.2 = handweb=HandHTTP
> browser.3 = avantgo=AvantGo
> browser.4 = imode=DoCoMo
> browser.5 = opera=Opera
> browser.6 = lynx=Lynx
> browser.7 = java=Java
> browser.8 = wap=Nokia
> browser.9 = wap=UP
> browser.10 = wap=Wapalizer
> browser.11 = mozilla5=Mozilla/5
> browser.12 = mozilla5=Netscape6/
> browser.13 = netscape=Mozilla
>
> Bye,
> Murali
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

--
Hope to see you at my presentation, "Making the Most of XML, XSL and Server-Side Processing"
at XML DevCon 2000, June 25-28, 2000.

Russell Castagnaro
Chief Mentor
SyncTank Solutions
http://www.synctank.com

Earth is the cradle of mankind; one does not remain in the cradle forever
-Tsiolkovsky