You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob Stevens <ro...@cruzio.com> on 2011/07/24 00:21:21 UTC

Cocoon 2.1.11 in Tomcat 7.0.12: cocoon welcome page will not display

I am trying to learn about servlets, java server pages, web-apps etc.
I am new to this world, but I am an experienced programmer (though not
in Java).
I have built the cocoon.war file in the prescribed manner and have
tomcat installed.
I have copied the cocoon.war file into the webapps directory, and when
tomcat
start it successfully unpacks the .war and creates the cocoon directory
structure.
Every web page that I have read says that this is all that is required
to deploy cocoon
under tomcat.

However, when I browse to  the cocoon welcome page:
    localhost:8080/cocoon
I get a fault and a java stack trace that I include at the end of the email.
Browsing to localhost:8080/cocoon/welcome gives a similar result.
The gist appears to be that it is looking for an "index.html" file.

I have run cocoon successfully standalone (port 8888 etc) and everything
looks fine.
I am only trying to deploy cocoon in a servlet container as an exercise
to improve
my understanding: evidently that understand is much in need of improvement.

I must be doing something wrong that is very basic but I don't know what.

Can someone please give me some pointers as to what may be wrong.
I am running under Linux: Ubuntu Lucid.

Thanks
Rob Stevens



=================== java stack trace begins here =========================
org.apache.cocoon.ResourceNotFoundException: No pipeline matched
request: index.html
    at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:149)
    at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
    at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
    at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
    at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)
    at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
    at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
    at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
    at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
    at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Cocoon 2.1.11 in Tomcat 7.0.12: cocoon welcome page will not display

Posted by Rob Stevens <ro...@cruzio.com>.
Chris

Thank you for taking the time to respond to my email.
I am sure it must take quite a bit of your time and I am most grateful.

I cannot find a web.xml file in META-INF, but here is what I see in
the <servlet-mapping> sections in
    <tomcat-top-level>/webapps/cocoon/WEB-INF/web.xml
(should there be such a file in META-INF? I see only INDEX.LIST and
MANIFEST.MF)
As you said, it seems as though something is missing

(BTW: I am using the book "Cocoon: Building XML Applications"
 by Langham & Ziegler. It is very out-of-date and that is probably part
of my trouble.
 There don't appear to be many up-to-the-minute books around)

Thx
Rob Stevens

================= snippet =====================
  <servlet-mapping>
    <servlet-name>Cocoon</servlet-name>
    <url-pattern>*.jsp</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>Cocoon</servlet-name>
    <url-pattern>*.html</url-pattern>
  </servlet-mapping>

    <!-- Mapping of Slide's WebDAV servlet. -->
    <servlet-mapping>
        <servlet-name>webdav</servlet-name>
        <url-pattern>/webdav/*</url-pattern>
    </servlet-mapping>

  <!-- XMLDB Block, Xindice XML-RPC Server servlet mapping -->
  <servlet-mapping>
    <servlet-name>Xindice</servlet-name>
    <url-pattern>/xindice/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>Xindice</servlet-name>
    <url-pattern>/xindice/</url-pattern>
  </servlet-mapping>
====================== end snippet ===============================



> Rob,
>
> On 7/23/2011 6:21 PM, Rob Stevens wrote:
> > Every web page that I have read says that this is all that is
> > required to deploy cocoon under tomcat.
>
> You should be ready to go at this point.
>
> > However, when I browse to  the cocoon welcome page:
> > localhost:8080/cocoon
>
> > I get a fault and a java stack trace that I include at the end of the
> > email. Browsing to localhost:8080/cocoon/welcome gives a similar
> > result. The gist appears to be that it is looking for an "index.html"
> > file.
>
> Unless it's been given any other instructions, Tomcat's DefaultServlet
> will change anything that looks like a directory into <directory>/ and
> then use the "welcome file" configuration (defaults to index.jsp,
> index.html).
>
> > I have run cocoon successfully standalone (port 8888 etc) and
> > everything looks fine. I am only trying to deploy cocoon in a servlet
> > container as an exercise to improve my understanding: evidently that
> > understand is much in need of improvement.
>
> Cocoon always runs in a servlet container, it's just that you can also
> build it so that it runs in one supplied by the good people over at the
> Cocoon project. Their build procedure seems geared toward building a
> self-container Cocoon "program" that looks like it's standalone but it
> actually a servlet container (probably Tomcat or Jetty) wrapped around
> Cocoon.
>
> I myself run Cocoon (under TC 6) and have never bothered to run their
> included container. I should be able to help.
>
> > =================== java stack trace begins here
> > =========================
> > org.apache.cocoon.ResourceNotFoundException: No pipeline matched
> > request: index.html at
>
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:149)
>
> Okay, so the good news is that Cocoon has been loaded and it responding
> to requests. The only question is why it is looking for "index.html". I
> suspect that something hasn't been matched properly /before/ this point,
> and Tomcat's DefaultServlet is doing some redirecting and/or searching
> for a welcome-file.
>
> It would be good if you could provide the portion of your Cocoon's
> META-INF/web.xml file that contains the <servlet-mapping> sections. I
> suspect that localhost:8080/cocoon or localhost:8080/cocoon/welcome
> isn't properly mapped to the Cocoon servlet.
>
> -chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Cocoon 2.1.11 in Tomcat 7.0.12: cocoon welcome page will not display

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob,

On 7/23/2011 6:21 PM, Rob Stevens wrote:
> Every web page that I have read says that this is all that is
> required to deploy cocoon under tomcat.

You should be ready to go at this point.

> However, when I browse to  the cocoon welcome page: 
> localhost:8080/cocoon
> 
> I get a fault and a java stack trace that I include at the end of the
> email. Browsing to localhost:8080/cocoon/welcome gives a similar
> result. The gist appears to be that it is looking for an "index.html"
> file.

Unless it's been given any other instructions, Tomcat's DefaultServlet
will change anything that looks like a directory into <directory>/ and
then use the "welcome file" configuration (defaults to index.jsp,
index.html).

> I have run cocoon successfully standalone (port 8888 etc) and
> everything looks fine. I am only trying to deploy cocoon in a servlet
> container as an exercise to improve my understanding: evidently that
> understand is much in need of improvement.

Cocoon always runs in a servlet container, it's just that you can also
build it so that it runs in one supplied by the good people over at the
Cocoon project. Their build procedure seems geared toward building a
self-container Cocoon "program" that looks like it's standalone but it
actually a servlet container (probably Tomcat or Jetty) wrapped around
Cocoon.

I myself run Cocoon (under TC 6) and have never bothered to run their
included container. I should be able to help.

> =================== java stack trace begins here
> ========================= 
> org.apache.cocoon.ResourceNotFoundException: No pipeline matched 
> request: index.html at
> 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:149)

Okay, so the good news is that Cocoon has been loaded and it responding
to requests. The only question is why it is looking for "index.html". I
suspect that something hasn't been matched properly /before/ this point,
and Tomcat's DefaultServlet is doing some redirecting and/or searching
for a welcome-file.

It would be good if you could provide the portion of your Cocoon's
META-INF/web.xml file that contains the <servlet-mapping> sections. I
suspect that localhost:8080/cocoon or localhost:8080/cocoon/welcome
isn't properly mapped to the Cocoon servlet.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4twnQACgkQ9CaO5/Lv0PATBACfSafIM/huSvm5hkYfivQNv7OV
0+0An1lxoVa3hP2WCff0Ks/qNjf6d3b3
=J/Yl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org