cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Castagnaro <russ...@synctank.com>
Subject Re: cocoon in a web application in weblogic..
Date Fri, 26 May 2000 21:16:44 GMT
Hmm..

I wonder if this is a variation on the same problem that I've been having accessing the
cocoon.properties file.
I found that it had to be in the public_html directory, which is bizarre.

Wait... Are you saying that the xml document is NOT in a sub directory of public_html??

I would think that it has to be.


Pat Laplante wrote:

> Anybody was succesfull with web app and cocoon???
>
> -----Original Message-----
> From: Pat Laplante [mailto:plaplante@vanteon.com]
> Sent: Friday, May 26, 2000 3:35 PM
> To: cocoon-users@xml.apache.org; russell@synctank.com
> Subject: RE: cocoon in a web application in weblogic..
>
> I know why cocoon was not starting.... Because I had to put these line in my
> web.xml files:
>
>     <context-param>
>         <param-name>weblogic.httpd.register.*.xml</param-name>
>         <param-value>org.apache.cocoon.Cocoon</param-value>
>     </context-param>
>
>     <context-param>
>         <param-name>properties</param-name>
>         <param-value>cocoon.properties</param-value>
>     </context-param>
>
>     <context-param>
>         <param-name>weblogic.class.path</param-name>
>
> <param-value>P:\cocoon-1.7.4\lib\xerces_1_0_3.jar;P:\weblogic\license;P:\web
> logic\classes;P:\weblogic\myserver\serverclasses;P:\weblogic\lib\weblogicaux
> .jar;P:\cocoon-1.7.4\bin\cocoon.jar;P:\cocoon-1.7.4\lib\fop_0_12_1.jar;P:\co
> coon-1.7.4\lib\xalan_1_0_1.jar;P:\jdk1.2.2\lib\tools.jar</param-value>
>     </context-param>
>
> Now, cocoon got call when I hit an xml pages in a web app.
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> BUT
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> It still doesn't work... and I don't know why... Here is the output of the
> browser screen... From what I understand, Cocoon got the wrong path for the
> file since it is looking in the public_html\mywebapp when my mywebapp is
> somewhere else... Anybody know where to look for that problem?
>
> Cocoon 1.7.4
>
> Error found handling the request.
> org.xml.sax.SAXParseException: File
> "file:/P:/weblogic/myserver/public_html/calisse/hello-page.xml" not found.
>         at
> org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105)
>         at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1347)
>         at
> org.apache.xerces.framework.XMLParser.startReadingFromDocument(XMLParser.jav
> a:2424)
>         at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:346)
>         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1207)
>         at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:84)
>         at org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
>         at
> org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile.jav
> a:78)
>         at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
>         at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>         at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :105)
>         at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:742)
>         at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:686)
>         at
> weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
> Manager.java:247)
>         at
> weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
>         at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
>
> Warning: this page has been dynamically generated.
>
> Copyright (c) 1999-2000 The Apache XML Project.
> All rights reserved.
>
> -----Original Message-----
> From: Russell Castagnaro [mailto:russell@synctank.com]
> Sent: Friday, May 26, 2000 1:47 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: cocoon in a web application in weblogic..
>
> Pat,
> If you are not getting an error when you access the .xml file, your servlet
> registration has been messed up (in the weblogic.properties file)
>
> use the AdminProps servlet to view all of the properties settings,  Or you
> might
> look at the weblogic log to check whether it is reading the registration as
> it
> should be.
>
> Use your weblogic.log file to determine what the error is, and that should
> make
> diagnosis much easier!
>
> So you should have :
> weblogic.httpd.register.*.xml=org.apache.cocoon.Cocoon
> weblogic.httpd.initArgs.*.xml=properties=<location of cocoon properties>
>
> and the props file looks like:
> ############################################################################
> ##
> #                          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
>
> ##########################################
> # XML Parsers                            #
> ##########################################
>
> # Apache Xerces 1.0.1+ (http://xml.apache.com/)
> parser = org.apache.cocoon.parser.XercesParser
>
> # 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
>
> ##########################################
> # 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
>
> # eXtensible Server Pages Processor (XSP)
> processor.type.xsp = org.apache.cocoon.processor.xsp.XSPProcessor
>
> # sets the repository where the compiled pages are stored.
> processor.xsp.repository = ./repository
>
> # Set the libraries associated with the given namespace.
> # Use the syntax:
> #   processor.xsp.library.<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.library.context.java =
> file://c:/cocoon-1.7.4/src/org/apache/cocoon/processor/xsp/library/java/cont
> ext.xsl
>
> #processor.xsp.library.cookie.java =
> file://c:/cocoon-1.7.4/src/org/apache/cocoon/processor/xsp/library/java/cook
> ie.xsl
>
> #processor.xsp.library.global.java =
> file://c:/cocoon-1.7.4/src/org/apache/cocoon/processor/xsp/library/java/glob
> al.xsl
>
> #processor.xsp.library.request.java =
> file://c:/cocoon-1.7.4/src/org/apache/cocoon/processor/xsp/library/java/requ
> est.xsl
>
> #processor.xsp.library.response.java =
> file://c:/cocoon-1.7.4/src/org/apache/cocoon/processor/xsp/library/java/resp
> onse.xsl
>
> #processor.xsp.library.session.java =
> file://c:/cocoon-1.7.4/src/org/apache/cocoon/processor/xsp/library/java/sess
> ion.xsl
>
> #processor.xsp.library.util.java =
> file://c:/cocoon-1.7.4/src/org/apache/cocoon/processor/xsp/library/java/util
> .xsl
>
> # LDAP Processor
> #processor.type.ldap = org.apache.cocoon.processor.ldap.LdapProcessor
>
> #### !!!!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                         #
> ##########################################
>
> formatter.type.text/xml    = org.apache.cocoon.formatter.XMLFormatter
> formatter.type.text/wml    = org.apache.cocoon.formatter.WMLFormatter
> formatter.type.text/html   = org.apache.cocoon.formatter.HTMLFormatter
> formatter.type.text/plain  = org.apache.cocoon.formatter.TextFormatter
> formatter.type.text/xslfo  = org.apache.cocoon.formatter.FO2PDFFormatter
> formatter.type.model/vrml  = org.apache.cocoon.formatter.VRMLFormatter
>
> # 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 above map.
> formatter.default = text/html
>
> # Specifies the text stream format. (meaningful for text formatters only)
> # Supported styles are
> #   - normal
> #   - compact
> formatter.style = normal
>
> ##########################################
> # Cache Managers                         #
> ##########################################
>
> # the default cache
> cache = org.apache.cocoon.cache.CocoonCache
>
> ##########################################
> # Object Storage Systems                 #
> ##########################################
>
> # the default object storage
> store = org.apache.cocoon.store.MemoryStore
>
> ##########################################
> # Language Interpreters                  #
> ##########################################
>
> # These are used by the DCP Processor
> interpreter.type.java = org.apache.cocoon.interpreter.java.JavaInterpreter
>
> # Indicates the default language if not specified in the DCP PIs
> interpreter.default = java
>
> ##########################################
> # User Agents (Browsers)                 #
> ##########################################
>
> browser.0 = explorer=MSIE
> browser.1 = opera=Opera
> browser.2 = lynx=Lynx
> browser.3 = java=Java
> browser.4 = wap=Nokia-WAP-Toolkit
> browser.5 = wap=UP
> browser.6 = netscape=Mozilla
>
> Pat Laplante wrote:
>
> > After further investigation, Cocoon doesn't even start.
> > I put a trace statement in cocoon code in the init function
> > to know when cocoon gets loaded, and it does when I hit a
> > page in my public_html folder, but if I hit a page in my
> > webapp (http://localhost/mywebapp/page.xml) cocoon doesn't start.
> >
> > My question now, is how do you setup a web app in such a way
> > that cocoon will start when *.xml gets hit???
> >
> > What is your files cocoon-wl.properties???
> >
> > Thanks for all of you for help...
> > Pat
> >
> > -----Original Message-----
> > From: Russell Castagnaro [mailto:russell@synctank.com]
> > Sent: Friday, May 26, 2000 9:19 AM
> > To: cocoon-users@xml.apache.org
> > Subject: Re: cocoon in a web application in weblogic..
> >
> > Hmm...
> > I'm not sure what you mean pat.
> >  the way you register cocoon is:
> > weblogic.httpd.register.*.xml=\
> >        org.apache.cocoon.Cocoon
> > weblogic.httpd.initArgs.*.xml=\
> >   properties=c:/cocoon-1.7.4/conf/cocoon-wl.properties
> >
> > But you must have that working already, since you get cocoon errors.
> >
> > You should be able to call the .xml file directly, or use it in a SHTML
> > file.
> > (can't use GNUJSP Includes though)
> > -rrc
> >
> > Pat Laplante wrote:
> >
> > > Can you tell me if you have something special that reference cocoon
> > > in you web.xml file (in your webapp)?
> > >
> > > How do you specify weblogic in you weblogic.properties file?
> > >
> > > Thanks
> > > Pat
> > >
> > > -----Original Message-----
> > > From: Russell Castagnaro [mailto:russell@synctank.com]
> > > Sent: Friday, May 26, 2000 1:40 AM
> > > To: cocoon-users@xml.apache.org
> > > Subject: Re: cocoon in a web application in weblogic..
> > >
> > > Pat,
> > >
> > > What version of WLS are you using?  It works for me just fine with 4.51
> > and
> > > 5.1
> > > If your 'webpath' is your public_html directory, you shouldn't include
> it
> > in
> > > the
> > > xsl href.
> > > You could try using the http://localhost/webpath/hello-page.xsl
> > >
> > > If you haven't chaged the default settings though you need to point it
> to
> > > port
> > > 7001.
> > > http://localhost:7001/webpath/hello-page.xsl
> > > -rrc
> > >
> > > Pat Laplante wrote:
> > >
> > > > Yep they are both under the webapppath folder.  I put the reference to
> > be
> > > > href="hello-page.xsl" and now the browser tell me this:
> > > >
> > > > The XML page cannot be displayed
> > > > Cannot view XML input using XSL style sheet. Please correct the error
> > and
> > > > then click the Refresh button, or try again later.
> > > >
> > >
> >
> > --------------------------------------------------------------------------
> > > --
> > > > ----
> > > >
> > > > The system cannot locate the object specified. Error processing
> resource
> > > > 'http://localhost/hello-page-html.xsl'.
> > > >
> > > > And web logic tell me this:
> > > > hu May 25 07:57:59 PDT 2000:<E> <ServletContext-General> Cannot
find
> > > > resource 'hello-page-html.xsl' in d
> > > > cument root 'P:\weblogic\myserver\public_html'
> > > >
> > > > What is wrong then.....
> > > >
> > > > -----Original Message-----
> > > > From: Hans Ulrich Niedermann [mailto:niedermann@isd.uni-stuttgart.de]
> > > > Sent: Thursday, May 25, 2000 1:57 AM
> > > > To: cocoon-users@xml.apache.org
> > > > Cc: Azathoth@cyberdude.com
> > > > Subject: Re: cocoon in a web application in weblogic..
> > > >
> > > > "Pat Laplante" <plaplante@vanteon.com> writes:
> > > >
> > > > > I am trying to run cocoon in a web application.  I took the
> > > hello-page.xml
> > > > > file and the hello-page-html.xsl file and move them under my
> > > > webapplication
> > > > > folder.
> > > > >
> > > > > I change the path in the hello-page.xml from
> > > > > <?xml-stylesheet href="hello-page-html.xsl" type="text/xsl"?>
to
> > > > > <?xml-stylesheet href="webapppath/hello-page-html.xsl"
> > type="text/xsl"?>
> > > >
> > > > If both hello-page.xml and hello-page-html.xsl are located in the same
> > > > directory, the reference should be href="hello-page-html.xsl". The
> > > > stylesheet location is interpreted relatively to the location of the
> > > > hello-page.xml file.
> > > >
> > > > > when I hit the address "localhost/mywebapp, I got that message in
> the
> > > > > browser:
> > > > > type="text/html"
> > > >
> > > > Uli
> > > > --
> > > > Hans Ulrich Niedermann      <niedermann@normans.isd.uni-stuttgart.de>
> > > > Systemadministration         http://www.normans.isd.uni-stuttgart.de/
> > > > Institut für Statik und Dynamik der Luft- und Raumfahrtkonstruktionen
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > > > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> > >
> > > --
> > > 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
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> > --
> > 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
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> --
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--
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



Mime
View raw message