You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by SAXESS - Hussayn Dabbous <da...@saxess.com> on 2002/12/18 00:30:58 UTC
Re: sub sitemaps problems
I had essentially the same problem with my webapp.
I solved it as follows:
<map:match pattern="gallery">
<map:redirect-to session="false" uri="gallery/"/>
</map:match>
<map:match pattern="gallery/**">
<map:mount uri-prefix="gallery"
check-reload="yes"
reload-method="synchron"
src="gallery/" />
</map:match>
I posted a question to this list, but no better
solution was posted nor any hint, why the problem
exists.
regards, hussayn
Tomasz Muldner wrote:
> Hi, I'm using Tomcat 4.1.12 and Cocoon: cocoon-2.0.4-vm14-bin, jdk 1.4.1,
> windows xp
> I tried one example from the Cocoon book, listing 4.28 (gallery listing) to
> be executed from a sub sitemap.
> In the directory
> mount
> I created a directory
> tm
> and in this directory, I created a directory
> gallery (with jpeg files), xsl file and a local sitemap (sitemap.xmap) -
> last two files are included
>
> When I enter:
> http://localhost:8080/cocoon/mount/tm/gallery/
> it shows the directory listing, but when I do this:
> http://localhost:8080/cocoon/mount/tm/gallery
> it complains:
>
> ----------------------------------------------------------------------------
> ----
>
> type resource-not-found
>
> message Resource not found
>
> description The requested URI "/cocoon/mount/tm/gallery" was not found.
>
> sender org.apache.cocoon.servlet.CocoonServlet
>
> source Cocoon servlet
>
> request-uri
>
> /cocoon/mount/tm/gallery
> path-info
>
> mount/tm/gallery
>
> Dr. Tomasz Müldner, Professor, Graduate Program Coordinator
> Jodrey School of Computer Science
> Acadia University, Wolfville, NS, Canada B4P 2R6
> phone: 902-585-1578 FAX: (902) 585-1067
> Email:
> university-related: Tomasz.muldner@acadiau.ca
> personal: tmuldner@ns.sympatico.ca
> Internet:
> university-related: http://dragon.acadiau.ca/~solid
> personal: http://www3.ns.sympatico.ca/tmuldner/
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: sub sitemaps problems
Posted by Geoff Howard <co...@leverageweb.com>.
What about <map:match type="regexp" pattern="^gallery[/]?$"> as a better
solution? (if relative links are not an issue)
Geoff Howard
> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
>
> > I posted a question to this list, but no better
> > solution was posted nor any hint, why the problem
> > exists.
>
> I don't know a better solution, but isn't the reason obvious?
>
> http://localhost:8080/cocoon/mount/tm/gallery/ points to a directory
> 'gallery'
>
> while
> http://localhost:8080/cocoon/mount/tm/gallery points to a file 'gallery'.
>
> 'gallery' is of course different to 'gallery/'.
>
> You can match on "gallery**" to catch both, but beware, that you are on
> 2 different directory levels, so relative links may not work in one
> case. So maybe your redirect is already the best solution.
>
> Regards,
>
> Joerg
>
> SAXESS - Hussayn Dabbous wrote:
> > I had essentially the same problem with my webapp.
> > I solved it as follows:
> >
> > <map:match pattern="gallery">
> > <map:redirect-to session="false" uri="gallery/"/>
> > </map:match>
> >
> > <map:match pattern="gallery/**">
> > <map:mount uri-prefix="gallery"
> > check-reload="yes"
> > reload-method="synchron"
> > src="gallery/" />
> > </map:match>
> >
> > I posted a question to this list, but no better
> > solution was posted nor any hint, why the problem
> > exists.
> >
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: sub sitemaps problems
Posted by Joerg Heinicke <jo...@gmx.de>.
> I posted a question to this list, but no better
> solution was posted nor any hint, why the problem
> exists.
I don't know a better solution, but isn't the reason obvious?
http://localhost:8080/cocoon/mount/tm/gallery/ points to a directory
'gallery'
while
http://localhost:8080/cocoon/mount/tm/gallery points to a file 'gallery'.
'gallery' is of course different to 'gallery/'.
You can match on "gallery**" to catch both, but beware, that you are on
2 different directory levels, so relative links may not work in one
case. So maybe your redirect is already the best solution.
Regards,
Joerg
SAXESS - Hussayn Dabbous wrote:
> I had essentially the same problem with my webapp.
> I solved it as follows:
>
> <map:match pattern="gallery">
> <map:redirect-to session="false" uri="gallery/"/>
> </map:match>
>
> <map:match pattern="gallery/**">
> <map:mount uri-prefix="gallery"
> check-reload="yes"
> reload-method="synchron"
> src="gallery/" />
> </map:match>
>
> I posted a question to this list, but no better
> solution was posted nor any hint, why the problem
> exists.
>
> regards, hussayn
>
> Tomasz Muldner wrote:
>
>> Hi, I'm using Tomcat 4.1.12 and Cocoon: cocoon-2.0.4-vm14-bin, jdk 1.4.1,
>> windows xp
>> I tried one example from the Cocoon book, listing 4.28 (gallery
>> listing) to
>> be executed from a sub sitemap.
>> In the directory
>> mount
>> I created a directory
>> tm
>> and in this directory, I created a directory
>> gallery (with jpeg files), xsl file and a local sitemap (sitemap.xmap) -
>> last two files are included
>>
>> When I enter:
>> http://localhost:8080/cocoon/mount/tm/gallery/
>> it shows the directory listing, but when I do this:
>> http://localhost:8080/cocoon/mount/tm/gallery
>> it complains:
>>
>> ----------------------------------------------------------------------------
>>
>> ----
>>
>> type resource-not-found
>>
>> message Resource not found
>>
>> description The requested URI "/cocoon/mount/tm/gallery" was not found.
>>
>> sender org.apache.cocoon.servlet.CocoonServlet
>>
>> source Cocoon servlet
>>
>> request-uri
>>
>> /cocoon/mount/tm/gallery
>> path-info
>>
>> mount/tm/gallery
>>
>> Dr. Tomasz Müldner
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>