cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Arnold <Jac...@envworld.com>
Subject RE: How to create a dev env for a new Cocoon app
Date Mon, 06 Jan 2003 15:14:27 GMT
Create your new app in the cocoon directory instead. And then add your app
to Cocoon's main sitemap. Add something like this to cocoon\sitemap.xmap
under map:pipeline.

<map:match pattern="base-directory-name/**">
  <map:mount check-reload="yes" src="base-directory-name/"
uri-prefix="base-directory-name/"/>
</map:match>

You don't need to copy the WEB-INF directory. You can check the FAQs for
ways to take cocoon/ out of your path.

J


-----Original Message-----
From: Jim Whetstone [mailto:jameswhetstone@hotmail.com]
Sent: Friday, January 03, 2003 4:35 PM
To: cocoon-users@xml.apache.org
Subject: How to create a dev env for a new Cocoon app


I've been tryin' to create a devlopment environment using Tomcat 4.1.18 and
Cocoon 2.0.4 without success.  So these are the steps I'm trying:

1) Create a new base directory under the "webapp" directory of Tomcat
2) Copy cocoon/WEB-INF from the cocoon app to my new directory
3) create a new sitemap.xmap file under the base directory

Here is the contents of sitemap.xmap :

<?xml version="1.0" encoding="UTF-8"?>          
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> 
          
 
<!--===========================Components================================-->
  <map:components>
          
    <map:generators default="file">
    <map:generator name="file" label="content" 
                   src="org.apache.cocoon.generation.FileGenerator"/> 
    </map:generators> 

    <map:transformers default="xslt">
      <map:transformer name="xslt"
 
src="org.apache.cocoon.transformation.XalanTransformer">
        <use-request-parameters>false</use-request-parameters>
      </map:transformer> 
    </map:transformers>

    <map:serializers default="html">
      <map:serializer name="html" mime-type="text/html" 
                      src="org.apache.cocoon.serialization.HTMLSerializer"/>

    </map:serializers>

    <map:selectors default="browser">
      <map:selector name="browser" 
                    factory="org.apache.cocoon.selection.BrowserSelector">
        <browser name="explorer" useragent="MSIE"/>
        <browser name="netscape" useragent="Mozilla"/> 
      </map:selector> 
    </map:selectors>

    <map:matchers default="uri">
      <map:matcher name="uri" 
                   factory="org.apache.cocoon.matching.WildcardURIMatcher"/>
    </map:matchers> 

  </map:components> 
          
 
<!--===========================Pipelines=================================-->
  <map:pipelines> 
    <map:pipeline> 
      <map:match pattern="hello.html">
        <map:generate src="hello-page.xml"/>
        <map:transform src="simple-page2html.xsl"/>
        <map:serialize type="html"/> 
      </map:match> 
    </map:pipeline> 
  </map:pipelines>
          
</map:sitemap>
 

4)  For testing purposes I put hello-page.xml and simple-page2html.xsl under
the base directory.

Now when I try to access hello.html I get this message from Cocoon:

type fatal
message Failed to load sitemap from jndi:/localhost/NC/sitemap.xmap
description org.apache.cocoon.ProcessingException: Failed to load sitemap
from jndi:/localhost/NC/sitemap.xmap:
org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException: Resource not found
jndi:/localhost/NC/sitemap.xmap
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
stack-trace
org.apache.cocoon.ProcessingException: Failed to load sitemap from
jndi:/localhost/NC/sitemap.xmap:
org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException: Resource not found
jndi:/localhost/NC/sitemap.xmap
	at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultT
reeBuilder.java:393)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeP
rocessor.java:392)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:311)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:299)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:596)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1104)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
	at java.lang.Thread.run(Thread.java:536)
Caused by: org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException: Resource not found
jndi:/localhost/NC/sitemap.xmap
	at
org.apache.cocoon.components.source.SourceUtil.handle(SourceUtil.java:177)
	at
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:118)
	at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultT
reeBuilder.java:387)
	... 35 more
Caused by: org.apache.excalibur.source.SourceNotFoundException: Resource not
found jndi:/localhost/NC/sitemap.xmap
	at
org.apache.excalibur.source.impl.URLSource.getInputStream(URLSource.java:265
)
	at
org.apache.cocoon.components.source.impl.DelayedRefreshSourceWrapper.getInpu
tStream(DelayedRefreshSourceWrapper.java:95)
	at
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:113)
	... 36 more
org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException: Resource not found
jndi:/localhost/NC/sitemap.xmap
	at
org.apache.cocoon.components.source.SourceUtil.handle(SourceUtil.java:177)
	at
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:118)
	at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultT
reeBuilder.java:387)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeP
rocessor.java:392)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:311)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:299)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:596)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1104)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
	at java.lang.Thread.run(Thread.java:536)
Caused by: org.apache.excalibur.source.SourceNotFoundException: Resource not
found jndi:/localhost/NC/sitemap.xmap
	at
org.apache.excalibur.source.impl.URLSource.getInputStream(URLSource.java:265
)
	at
org.apache.cocoon.components.source.impl.DelayedRefreshSourceWrapper.getInpu
tStream(DelayedRefreshSourceWrapper.java:95)
	at
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:113)
	... 36 more
org.apache.excalibur.source.SourceNotFoundException: Resource not found
jndi:/localhost/NC/sitemap.xmap
	at
org.apache.excalibur.source.impl.URLSource.getInputStream(URLSource.java:265
)
	at
org.apache.cocoon.components.source.impl.DelayedRefreshSourceWrapper.getInpu
tStream(DelayedRefreshSourceWrapper.java:95)
	at
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:113)
	at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultT
reeBuilder.java:387)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeP
rocessor.java:392)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:311)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:299)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:596)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1104)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
	at java.lang.Thread.run(Thread.java:536)

request-uri
/NC/hello.html
path-info
hello.html
 
Can anyone tell me what I'm doing wrong?
TIA,
JW

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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