You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Edward S <su...@gmail.com> on 2008/02/26 16:50:33 UTC

Cocoon 2.2 - Webapp?

hey guys,

first of all let me thank every1 for all the help/replies that i am getting
for all the stupid doubts that i put in this forum :)

Now, here is another one:

http://cocoon.apache.org/2.2/1362_1_1.html
i was following this tutorial...to make a webapp. everything works when i
run it in Jetty using the mvn package jetty:run.

here are my questions:

   - The demo page says, if I need to access myBlock1 i should go to:
   http://localhost:8888/myBlock1/ . If my webapp is named, 'myWebApp'
   why isnt that a part of the Url?
   - If i do a mvn war:war, it creates a war file for the webapp with the
   following name: myWebApp-1.0-SNAPSHOT.war in the target directory.
   What should I do to deploy this war? If i drop it in tomcat, and restart
   it,  how can i access the same block?
   http://localhost:8080/myWebApp-1.0-SNAPSHOT/ i get a 'resource not
   found' if i go to http://localhost:8080/myBlock1 i get the same error.

thanks once again

Ed.

Re: Cocoon 2.2 - Webapp?

Posted by Luca Morandini <lm...@ieee.org>.
Edward S wrote:
> yes...there is a META-INF as well....and inside its subdirectories thrs 
> a pom.xml and pom.properties
> yes, it runs via jetty:run

So it should run when deployed under Tomcat as well.


> quick question: where does the sitemaps reside...when we build the war?

Under COB-INF, but in your case I suppose sitemaps are only under the 
blocks' JARs.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------


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


Re: Cocoon 2.2 - Webapp?

Posted by Luca Morandini <lm...@ieee.org>.
Edward S wrote:
> yes...there is a META-INF as well....and inside its subdirectories thrs 
> a pom.xml and pom.properties
> yes, it runs via jetty:run

So it should run when deployed under Tomcat as well.


> quick question: where does the sitemaps reside...when we build the war?

Under COB-INF, but in your case I suppose sitemaps are only under the 
blocks' JARs.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

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


Re: Cocoon 2.2 - Webapp?

Posted by Edward S <su...@gmail.com>.
yes...there is a META-INF as well....and inside its subdirectories thrs a
pom.xml and pom.properties
yes, it runs via jetty:run

quick question: where does the sitemaps reside...when we build the war?

-S2.




On 2/26/08, Luca Morandini <lm...@ieee.org> wrote:
>
> Edward S wrote:
> >
> > Now if i check the war file, there are 2 jars out there corresponding to
> > myBlock1 and myBlock2, which contain the sitemaps and everything else.
> > however, there is nothing except for the lib/jars,
> > applicationContext.xml, web.xml and log4j.xml in the war WEB-INF folder.
>
> Hmmm... a META-INF directory should be there too.
>
> Have you succeded in making the webapp run via mvn jetty:run ?
>
> Just to be on the safe side, issue a mvn clean before install.
>
> Regards,
>
> --------------------
>    Luca Morandini
> www.lucamorandini.it
> --------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: Cocoon 2.2 - Webapp?

Posted by Luca Morandini <lm...@ieee.org>.
Edward S wrote:
>  
> Now if i check the war file, there are 2 jars out there corresponding to 
> myBlock1 and myBlock2, which contain the sitemaps and everything else.
> however, there is nothing except for the lib/jars, 
> applicationContext.xml, web.xml and log4j.xml in the war WEB-INF folder.

Hmmm... a META-INF directory should be there too.

Have you succeded in making the webapp run via mvn jetty:run ?

Just to be on the safe side, issue a mvn clean before install.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------


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


Re: Cocoon 2.2 - Webapp?

Posted by Edward S <su...@gmail.com>.
that did not work....
maybe i am doing something wrong here.

when I added these:

    <dependencies>
      <dependency>*        <groupId>com.mycompany</groupId>
        <artifactId>myBlock1</artifactId>
        <version>1.0-SNAPSHOT</version>*
      </dependency>
      <dependency>*        <groupId>com.mycompany</groupId>
        <artifactId>myBlock2</artifactId>
        <version>1.0-SNAPSHOT</version>*
      </dependency>

and did the mvn package..it failed. so i had to do a mvn install for these 2
blocks b4 doing the mvn package.

Now if i check the war file, there are 2 jars out there corresponding to
myBlock1 and myBlock2, which contain the sitemaps and everything else.
however, there is nothing except for the lib/jars, applicationContext.xml,
web.xml and log4j.xml in the war WEB-INF folder.



-Ed.




On 2/26/08, Luca Morandini <lm...@ieee.org> wrote:
>
> Edward S wrote:
> >
> > here are my questions:
> >
> >     * The demo page says, if I need to access myBlock1 i should go to:
> >       http://localhost:8888/myBlock1/ . If my webapp is named,
> >       'myWebApp' why isnt that a part of the Url?
>
> Because it is, by default, the root application of that servlet container.
>
>
> >     * If i do a mvn war:war, it creates a war file for the webapp with
> >       the following name: myWebApp-1.0-SNAPSHOT.war in the target
> >       directory. What should I do to deploy this war? If i drop it in
> >       tomcat, and restart it,  how can i access the same block?
> >       http://localhost:8080/myWebApp-1.0-SNAPSHOT/ i get a 'resource not
> >       found'
>
> Because you didn't specify the block, only the webapp.
>
>
> > if i go to http://localhost:8080/myBlock1 i get the same error.
>
> Because the root webapp of Tomcat is not myWebApp-1.0-SNAPSHOT.
>
> Try specifying both
> (http://localhost:8080/myWebApp-1.0-SNAPSHOT/myBlock1/) instead
>
> Regards,
>
> --------------------
>    Luca Morandini
> www.lucamorandini.it
> --------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: Cocoon 2.2 - Webapp?

Posted by Luca Morandini <lm...@ieee.org>.
Edward S wrote:
>  
> here are my questions:
> 
>     * The demo page says, if I need to access myBlock1 i should go to:
>       http://localhost:8888/myBlock1/ . If my webapp is named,
>       'myWebApp' why isnt that a part of the Url?

Because it is, by default, the root application of that servlet container.


>     * If i do a mvn war:war, it creates a war file for the webapp with
>       the following name: myWebApp-1.0-SNAPSHOT.war in the target
>       directory. What should I do to deploy this war? If i drop it in
>       tomcat, and restart it,  how can i access the same block?
>       http://localhost:8080/myWebApp-1.0-SNAPSHOT/ i get a 'resource not
>       found' 

Because you didn't specify the block, only the webapp.


> if i go to http://localhost:8080/myBlock1 i get the same error.

Because the root webapp of Tomcat is not myWebApp-1.0-SNAPSHOT.

Try specifying both 
(http://localhost:8080/myWebApp-1.0-SNAPSHOT/myBlock1/) instead

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------


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


Re: Cocoon 2.2 - Webapp?

Posted by Luca Morandini <lm...@ieee.org>.
Edward S wrote:
>  
> here are my questions:
> 
>     * The demo page says, if I need to access myBlock1 i should go to:
>       http://localhost:8888/myBlock1/ . If my webapp is named,
>       'myWebApp' why isnt that a part of the Url?

Because it is, by default, the root application of that servlet container.


>     * If i do a mvn war:war, it creates a war file for the webapp with
>       the following name: myWebApp-1.0-SNAPSHOT.war in the target
>       directory. What should I do to deploy this war? If i drop it in
>       tomcat, and restart it,  how can i access the same block?
>       http://localhost:8080/myWebApp-1.0-SNAPSHOT/ i get a 'resource not
>       found' 

Because you didn't specify the block, only the webapp.


> if i go to http://localhost:8080/myBlock1 i get the same error.

Because the root webapp of Tomcat is not myWebApp-1.0-SNAPSHOT.

Try specifying both 
(http://localhost:8080/myWebApp-1.0-SNAPSHOT/myBlock1/) instead

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

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