You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Martynas Jusevicius <ma...@gmail.com> on 2005/07/16 10:20:53 UTC

Cocoon root application

Hi,

I have my application in a subfolder of Cocoon web root
(cocoon/build/webapp). How do I set it as the root app (which
currently shows "Welcome to Apache Cocoon!")? Should I simply copy my
files to the root folder and edit the main sitemap, or is there a
better way to do that?

Martynas Jusevicius

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


Re: Cocoon root application

Posted by "Volkm@r" <pl...@arcor.de>.
Martynas Jusevicius wrote:
> Well, looks like I'll have to edit the root sitemap. But I don't think
> it's a very clean way. What about Cocoon app's and sitemap's

If you don't need all the samples and API docs stuff that comes with 
Cocoon you may delete the main sitemap.xmap and create your own one. 
Check the original one when you need samples or explanations.

> independence? And what is mounting for? 

<http://wiki.apache.org/cocoon/UnderstandingCocoonMounts?highlight=%28mount%29>

-- 
Volkm@r


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


Re: Cocoon root application

Posted by Martynas Jusevicius <ma...@gmail.com>.
Well, looks like I'll have to edit the root sitemap. But I don't think
it's a very clean way. What about Cocoon app's and sitemap's
independence? And what is mounting for? Anyway, I don't have time to
dig that much longer.

Martynas Jusevicius

On 7/16/05, Volkm@r <pl...@arcor.de> wrote:
> Martynas Jusevicius wrote:
> > [...]
> > I have my application in a subfolder of Cocoon web root
> > (cocoon/build/webapp). How do I set it as the root app (which
> > currently shows "Welcome to Apache Cocoon!")? Should I simply copy my
> > files to the root folder and edit the main sitemap, or is there a
> > [...]
> 
> If you like to get rid of Cocoon samples and API docs that would be the
> easiest way.
> 
> If you like to include your application without breaking the samples you
> need to reorganize the main sitemap.xmap. There is an example[1] how to
> do that using Tomcat. For using it without Tomcat you would have to
> modify it somehow.
> 
> [1]<http://wiki.apache.org/cocoon/VirtualHostingHostMatcher?highlight=%28hostmatcher%29>
> --
> Volkm@r
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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


Re: Cocoon root application

Posted by "Volkm@r" <pl...@arcor.de>.
Martynas Jusevicius wrote:
> [...]
> I have my application in a subfolder of Cocoon web root
> (cocoon/build/webapp). How do I set it as the root app (which
> currently shows "Welcome to Apache Cocoon!")? Should I simply copy my
> files to the root folder and edit the main sitemap, or is there a
> [...]

If you like to get rid of Cocoon samples and API docs that would be the
easiest way.

If you like to include your application without breaking the samples you
need to reorganize the main sitemap.xmap. There is an example[1] how to
do that using Tomcat. For using it without Tomcat you would have to
modify it somehow.

[1]<http://wiki.apache.org/cocoon/VirtualHostingHostMatcher?highlight=%28hostmatcher%29>
-- 
Volkm@r


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


Re: Cocoon root application

Posted by "Volkm@r" <pl...@arcor.de>.
Martynas Jusevicius wrote:
> But there is no such folder "News"! There IS a redirect to "News/" in
> "myfolder/sitemap.xmap", but it is interpreted on the fly and has

Obviously mounting works. Otherwise the redirect from 
"myfolder/sitemap.xmap" wouldn't have been tried.

What happens when you remove (or comment out) that redirect?

Does anything else from your "myfolder" work then?

Did you try with a very rudimental "myfolder/sitemap.xmap" testcase?

If so, could you put your "myfolder/sitemap.xmap" on a public server and 
post the URL here?

> nothing to do with physical folders. And I don't get why Cocoon cares
> about redirects when mapping sitemaps.
-- 
Volkm@r


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


Re: Cocoon root application

Posted by Martynas Jusevicius <ma...@gmail.com>.
But there is no such folder "News"! There IS a redirect to "News/" in
"myfolder/sitemap.xmap", but it is interpreted on the fly and has
nothing to do with physical folders. And I don't get why Cocoon cares
about redirects when mapping sitemaps.

Martynas Jusevicius

On 7/18/05, Volkm@r <pl...@arcor.de> wrote:
> Martynas Jusevicius wrote:
> > Well, I tried that. I added the line
> >
> > <map:mount src="myfolder/" uri-prefix=""/>
> >
> > (it needed a slash on the end) to the <map:match pattern="*"> in the
> > first pipeline of my root sitemap.
> > But now accessing root I get:
> >
> > /usr/local/cocoon/build/webapp/News/sitemap.xmap (No such file or directory)
> 
> Did you forget to create a "sitemap.xmap" file in
> your folder "/usr/local/cocoon/build/webapp/News/"?
> --
> Volkm@r
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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


Re: Cocoon root application

Posted by "Volkm@r" <pl...@arcor.de>.
Martynas Jusevicius wrote:
> Well, I tried that. I added the line
> 
> <map:mount src="myfolder/" uri-prefix=""/>
> 
> (it needed a slash on the end) to the <map:match pattern="*"> in the
> first pipeline of my root sitemap.
> But now accessing root I get:
> 
> /usr/local/cocoon/build/webapp/News/sitemap.xmap (No such file or directory)

Did you forget to create a "sitemap.xmap" file in
your folder "/usr/local/cocoon/build/webapp/News/"?
-- 
Volkm@r


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


Re: Cocoon root application

Posted by Martynas Jusevicius <ma...@gmail.com>.
Well, I tried that. I added the line

<map:mount src="myfolder/" uri-prefix=""/>

(it needed a slash on the end) to the <map:match pattern="*"> in the
first pipeline of my root sitemap.
But now accessing root I get:

/usr/local/cocoon/build/webapp/News/sitemap.xmap (No such file or directory)

This is obviuosly related to the <map:redirect-to uri="News/" /> that
I have in my sub-sitemap at "myfolder/sitemap.xmap". But I don't get
what this redirect has to do with mapping, and how exactly mapping
works in general. Cocoon documentation describes it poorly.

Martynas Jusevicius

On 7/16/05, Upayavira <uv...@odoko.co.uk> wrote:
> Martynas Jusevicius wrote:
> > Hi,
> >
> > I have my application in a subfolder of Cocoon web root
> > (cocoon/build/webapp). How do I set it as the root app (which
> > currently shows "Welcome to Apache Cocoon!")? Should I simply copy my
> > files to the root folder and edit the main sitemap, or is there a
> > better way to do that?
> 
> In your root sitemap add a <map:mount src="myfolder" uri-prefix=""/>
> node right at the beginning of your first <map:pipeline>.
> 
> Notvery subtle, but should do it.
> 
> Upayavira
> 
> > Martynas Jusevicius
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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


Re: Cocoon root application

Posted by Upayavira <uv...@odoko.co.uk>.
Martynas Jusevicius wrote:
> Hi,
> 
> I have my application in a subfolder of Cocoon web root
> (cocoon/build/webapp). How do I set it as the root app (which
> currently shows "Welcome to Apache Cocoon!")? Should I simply copy my
> files to the root folder and edit the main sitemap, or is there a
> better way to do that?

In your root sitemap add a <map:mount src="myfolder" uri-prefix=""/> 
node right at the beginning of your first <map:pipeline>.

Notvery subtle, but should do it.

Upayavira

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


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


Re: Cocoon root application

Posted by paulb <pb...@gmail.com>.
If you use tomcat, the ROOT sub-directory of the webapps directory is
the default application. You can simply rename your subfolder to root
and put it into the webapps directory (then, the URL to access your
application will simply be http://my.host.name/). I believe you can
also change the default application from ROOT in one of the tomcat
configuration files.

On 7/16/05, Martynas Jusevicius <ma...@gmail.com> wrote:
> Hi,
> 
> I have my application in a subfolder of Cocoon web root
> (cocoon/build/webapp). How do I set it as the root app (which
> currently shows "Welcome to Apache Cocoon!")? Should I simply copy my
> files to the root folder and edit the main sitemap, or is there a
> better way to do that?
> 
> Martynas Jusevicius
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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