Hi,

Patrick Heiden wrote:
Hi Nikolas!

Could you please state a snipped of your sitemap to get an overview of how you actually redirect request params?

My problem is, that I have no snippet. I'm looking for a miraculous(?) way of passing them.

Let me give an (old) example snippet: If both sitemap parts would reside in one block (for example mounted under mount-A and mount-B I would do sth like (ignoring the lookup in my bean knowing all URL-Mappings)

<map:match pattern="/contact/">
   <map:generate src="cocoon://mount-A/niceurl/serving/form"/>
   <map:serialize />
</map:match>
<map:match pattern="/contact/hints/">
   <map:generate src="cocoon://mount-B/otherurl/serving/hints"/>
   <map:serialize />
</map:match>

The source generated in this case is an internal cocoon redirect and has access to the ObjectModel so it knowns everything - thats the miracle here ;-).

Now both approaches I thought of first don't work:
1)
<map:generate src="/block-A/niceurl/serving/form" />
is invalid as it tries to create a CocoonSource in the context of the core block "/", so the resource doesn't exist.

2)
<map:generate src="servlet:block-A:/niceurl/serving/form" />
Creates (as far as I understood) a new request (without including the params from the Object model).


Three aproaches which work - but I don't like for various reasons:

1)
<map:redirect-to uri="/block-A/niceurl/serving/form" />
Is an external redirect - realized by the user

2)
<map:generate src="servlet:block-A:/niceurl/serving/form?param1={request-param:param1}&param2={request-param:param1}" /> The problem is I do not know the parameters needed by block-A:/niceurl/serving/form

3)
Implement an extension of DispatcherServlet, which first asks my bean for the URL mapping, then using the normal Block-Dispatching mechanism for the mapped path. ... This should not be the best approach, or?

I hope this clarifies my problem - or is it weird what I am trying to do?

Regards
Niko

[SNIP]

I'm currently working on a cocoon 2.2 application using multiple blocks.
Every block is specialized on serving different content (probably
including forms). What I would like to achieve is to present a unified
URL space to the user, meaning something like

/block-A/niceurl/serving/form
/block-B/otherurl/serving/hints-from plain-file

should be
/contact/         (redirecting to /block-A/niceurl/serving/form)
/contact/hints/   (redirecting to /block-B/otherurl/serving/hints-fr...)

I first thought I could use a core block mounted at "/", resolving the
mapping (I have a spring bean administrating all mappings) and
"redirect" the request via Servlet-Service-Framework

[SNIP]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to