You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Patrick Etienne <pa...@library.gatech.edu> on 2011/01/27 22:06:26 UTC

Trouble deploying a *.war file to Tomcat from Cocoon 2.2

Cocoon & Tomcat Users,

I'm writing (cross-list) concerning a test case for producing a small cocoon
application for tomcat. I've been a user of Cocoon for quite some time, but
have had a little trouble adjusting to the new spring/maven-based 2.2
version. My quest at the moment is just to create the default cocoon block
as well as a webapp block in order to yield a war file to be uploaded to
tomcat. So far I've followed the instructions from "Your first Cocoon
application using Maven 2" <http://cocoon.apache.org/2.2/1159_1_1.html> and
"Deploying a Cocoon application" <http://cocoon.apache.org/2.2/1362_1_1.html>.
Rather than creating a two (option 2) blocks, a webapp block, and a parent
block, I've just created a regular block and a webapp block and attempted to
upload the resulting *.war file to Tomcat and deploy the war there. The
application seems to load alright (based off of information listed in the
tomcat manager, and catalina.out logs), but browsing to the actual URL seems
to show that I've not completed the process properly in some way.

The result is:
HTTP Status 404 - No block for /
------------------------------

*type* Status report

*message* *No block for /*

*description* *The requested resource (No block for /) is not available.*
------------------------------
Apache Tomcat/6.0.18

Catalina.out only shows:
Loading catalog:
file:/usr/local/apache-tomcat-6.0.18/work/Catalina/localhost/mobileApp-1.0.0/cocoon_xml_resolver_entities/catalog
In reference to the "mobileApp" application that I'm attempting to load.

Again, I have experience with both Cocoon < 2.2 and Tomcat in general, but
am having trouble understanding what needs to be done in order to run a
Cocoon 2.2 application in Tomcat (rather than Jetty). By the way, I'm able
to get everything to come up as expected from Jetty.

Any tips, hints, suggestions, or resources would be greatly appreciated!

 - Patrick E.

-- 
Patrick K. Etienne
Systems Analyst
Georgia Institute of Technology
Library & Information Center
(404) 385-8121

Re: Trouble deploying a *.war file to Tomcat from Cocoon 2.2

Posted by Andre Juffer <aj...@sun3.oulu.fi>.
Try:

http://localhost:8080/webapp/<name-of-default-block-here>/<something>

"something" should be matched in your sitemap of 
"name-of-default-block-here".

e.g.
http://localhost:8080/webapp/ui/login



On 01/27/2011 11:06 PM, Patrick Etienne wrote:
> Cocoon & Tomcat Users,
>
> I'm writing (cross-list) concerning a test case for producing a small
> cocoon application for tomcat. I've been a user of Cocoon for quite some
> time, but have had a little trouble adjusting to the new
> spring/maven-based 2.2 version. My quest at the moment is just to create
> the default cocoon block as well as a webapp block in order to yield a
> war file to be uploaded to tomcat. So far I've followed the instructions
> from "Your first Cocoon application using Maven 2"
> <http://cocoon.apache.org/2.2/1159_1_1.html> and "Deploying a Cocoon
> application" <http://cocoon.apache.org/2.2/1362_1_1.html>. Rather than
> creating a two (option 2) blocks, a webapp block, and a parent block,
> I've just created a regular block and a webapp block and attempted to
> upload the resulting *.war file to Tomcat and deploy the war there. The
> application seems to load alright (based off of information listed in
> the tomcat manager, and catalina.out logs), but browsing to the actual
> URL seems to show that I've not completed the process properly in some way.
>
> The result is:
> HTTP Status 404 - No block for /
> ------------------------------------------------------------------------
>
> *type* Status report
>
> *message* _No block for /_
>
> *description* _The requested resource (No block for /) is not available._
>
> ------------------------------------------------------------------------
>
>
>       Apache Tomcat/6.0.18
>
>
> Catalina.out only shows:
> Loading catalog:
> file:/usr/local/apache-tomcat-6.0.18/work/Catalina/localhost/mobileApp-1.0.0/cocoon_xml_resolver_entities/catalog
> In reference to the "mobileApp" application that I'm attempting to load.
>
> Again, I have experience with both Cocoon < 2.2 and Tomcat in general,
> but am having trouble understanding what needs to be done in order to
> run a Cocoon 2.2 application in Tomcat (rather than Jetty). By the way,
> I'm able to get everything to come up as expected from Jetty.
>
> Any tips, hints, suggestions, or resources would be greatly appreciated!
>
>   - Patrick E.
>
> --
> Patrick K. Etienne
> Systems Analyst
> Georgia Institute of Technology
> Library & Information Center
> (404) 385-8121
>
>


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat                   | WWW: www.strubiocat.oulu.fi
NordProt                     | WWW: www.nordprot.org
Triacle Biocomputing         | WWW: www.triacle-bc.com

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


RE: Trouble deploying a *.war file to Tomcat from Cocoon 2.2

Posted by Robby Pelssers <ro...@ciber.com>.
It depends on how you configured your block-servlet-service.xml

Assuming it looks like:

  <bean name="com.mycompany.block1.service" class="org.apache.cocoon.sitemap.SitemapServlet">
    <servlet:context mount-path="/block1" context-path="blockcontext:/block1/">
      <!-- in the servlet connections you typically add other block references which in your case might be 0
      <servlet:connections>  
        <entry key="ajax" value-ref="org.apache.cocoon.ajax.impl.servlet"/>
        <entry key="forms" value-ref="org.apache.cocoon.forms.impl.servlet"/>
      </servlet:connections> 
      --> 
    </servlet:context>
  </bean>


Then you should be able to invoke it like:

http://localhost:8080/{webappname}/block1{/somepattern}

And of course assuming you did add the block1 dependency in your webapp project:
E.g.
    <dependency>
      <groupId>com.mycompany</groupId>
      <artifactId>block1</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>


Kind regards,
Robby Pelssers

-----Oorspronkelijk bericht-----
Van: Patrick Etienne [mailto:patrick.etienne@library.gatech.edu]
Verzonden: do 27-1-2011 22:06
Aan: users@cocoon.apache.org; users@tomcat.apache.org
Onderwerp: Trouble deploying a *.war file to Tomcat from Cocoon 2.2
 
Cocoon & Tomcat Users,

I'm writing (cross-list) concerning a test case for producing a small cocoon
application for tomcat. I've been a user of Cocoon for quite some time, but
have had a little trouble adjusting to the new spring/maven-based 2.2
version. My quest at the moment is just to create the default cocoon block
as well as a webapp block in order to yield a war file to be uploaded to
tomcat. So far I've followed the instructions from "Your first Cocoon
application using Maven 2" <http://cocoon.apache.org/2.2/1159_1_1.html> and
"Deploying a Cocoon application" <http://cocoon.apache.org/2.2/1362_1_1.html>.
Rather than creating a two (option 2) blocks, a webapp block, and a parent
block, I've just created a regular block and a webapp block and attempted to
upload the resulting *.war file to Tomcat and deploy the war there. The
application seems to load alright (based off of information listed in the
tomcat manager, and catalina.out logs), but browsing to the actual URL seems
to show that I've not completed the process properly in some way.

The result is:
HTTP Status 404 - No block for /
------------------------------

*type* Status report

*message* *No block for /*

*description* *The requested resource (No block for /) is not available.*
------------------------------
Apache Tomcat/6.0.18

Catalina.out only shows:
Loading catalog:
file:/usr/local/apache-tomcat-6.0.18/work/Catalina/localhost/mobileApp-1.0.0/cocoon_xml_resolver_entities/catalog
In reference to the "mobileApp" application that I'm attempting to load.

Again, I have experience with both Cocoon < 2.2 and Tomcat in general, but
am having trouble understanding what needs to be done in order to run a
Cocoon 2.2 application in Tomcat (rather than Jetty). By the way, I'm able
to get everything to come up as expected from Jetty.

Any tips, hints, suggestions, or resources would be greatly appreciated!

 - Patrick E.

-- 
Patrick K. Etienne
Systems Analyst
Georgia Institute of Technology
Library & Information Center
(404) 385-8121


Re: Trouble deploying a *.war file to Tomcat from Cocoon 2.2

Posted by Patrick Etienne <pa...@library.gatech.edu>.
Many thanks for the replies!

Indeed, it was just a problem related to the servlet's mount-path and
context-path. I'll have to be a little more careful checking those details.
The help was greatly appreciated =)

 - Patrick E.

On Thu, Jan 27, 2011 at 11:27 PM, Robby Pelssers
<ro...@ciber.com>wrote:

> It depends on how you configured your block-servlet-service.xml
>
> Assuming it looks like:
>
>  <bean name="com.mycompany.block1.service"
> class="org.apache.cocoon.sitemap.SitemapServlet">
>    <servlet:context mount-path="/block1"
> context-path="blockcontext:/block1/">
>      <!-- in the servlet connections you typically add other block
> references which in your case might be 0
>      <servlet:connections>
>        <entry key="ajax" value-ref="org.apache.cocoon.ajax.impl.servlet"/>
>        <entry key="forms"
> value-ref="org.apache.cocoon.forms.impl.servlet"/>
>      </servlet:connections>
>      -->
>    </servlet:context>
>  </bean>
>
>
> Then you should be able to invoke it like:
>
> http://localhost:8080/{webappname}/block1{/somepattern}
>
> And of course assuming you did add the block1 dependency in your webapp
> project:
> E.g.
>    <dependency>
>      <groupId>com.mycompany</groupId>
>      <artifactId>block1</artifactId>
>      <version>1.0-SNAPSHOT</version>
>    </dependency>
>
>
> Kind regards,
> Robby Pelssers
>
> -----Oorspronkelijk bericht-----
> Van: Patrick Etienne [mailto:patrick.etienne@library.gatech.edu]
> Verzonden: do 27-1-2011 22:06
> Aan: users@cocoon.apache.org; users@tomcat.apache.org
> Onderwerp: Trouble deploying a *.war file to Tomcat from Cocoon 2.2
>
> Cocoon & Tomcat Users,
>
> I'm writing (cross-list) concerning a test case for producing a small
> cocoon
> application for tomcat. I've been a user of Cocoon for quite some time, but
> have had a little trouble adjusting to the new spring/maven-based 2.2
> version. My quest at the moment is just to create the default cocoon block
> as well as a webapp block in order to yield a war file to be uploaded to
> tomcat. So far I've followed the instructions from "Your first Cocoon
> application using Maven 2" <http://cocoon.apache.org/2.2/1159_1_1.html>
> and
> "Deploying a Cocoon application" <
> http://cocoon.apache.org/2.2/1362_1_1.html>.
> Rather than creating a two (option 2) blocks, a webapp block, and a parent
> block, I've just created a regular block and a webapp block and attempted
> to
> upload the resulting *.war file to Tomcat and deploy the war there. The
> application seems to load alright (based off of information listed in the
> tomcat manager, and catalina.out logs), but browsing to the actual URL
> seems
> to show that I've not completed the process properly in some way.
>
> The result is:
> HTTP Status 404 - No block for /
> ------------------------------
>
> *type* Status report
>
> *message* *No block for /*
>
> *description* *The requested resource (No block for /) is not available.*
> ------------------------------
> Apache Tomcat/6.0.18
>
> Catalina.out only shows:
> Loading catalog:
>
> file:/usr/local/apache-tomcat-6.0.18/work/Catalina/localhost/mobileApp-1.0.0/cocoon_xml_resolver_entities/catalog
> In reference to the "mobileApp" application that I'm attempting to load.
>
> Again, I have experience with both Cocoon < 2.2 and Tomcat in general, but
> am having trouble understanding what needs to be done in order to run a
> Cocoon 2.2 application in Tomcat (rather than Jetty). By the way, I'm able
> to get everything to come up as expected from Jetty.
>
> Any tips, hints, suggestions, or resources would be greatly appreciated!
>
>  - Patrick E.
>
> --
> Patrick K. Etienne
> Systems Analyst
> Georgia Institute of Technology
> Library & Information Center
> (404) 385-8121
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>



-- 
Patrick K. Etienne
Systems Analyst
Georgia Institute of Technology
Library & Information Center
(404) 385-8121