Rado, did you ever create an issue for this? You run into the same
issue when a container processes your request through an error
dispatcher (same as server-side forwards but for errors) as described
at http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryForCustomErrorPages.
Page and actionlinks on this custom error page are pointing to the
wrong location because they are rendered as relative links. You most
certainly *don't* want to redirect in this case as you want the user
to see the url that resulted in 401, 404, etc. Creating custom
versions of those components might be more or less ok for my use case,
but in general, I'm starting to wonder if it would be better if
Tapestry just rendered absolute links everywhere. Does anybody have
any creative workarounds for this?

Kalle


On Wed, Jun 17, 2009 at 5:36 AM, immutability <devli...@bielik.org> wrote:
>
> Thank you for the link pointing to the older discussion - I missed that one
> during my searches. Funny how everyone was saying to create a JIRA for this
> issue, but there doesn't seem to be any JIRA for this at the moment (open or
> closed) other than the old one related to the ComponentEventException in
> 5.0.x. I think I'll submit a new issue for this, just to see if it's
> something that will be considered for future releases.
>
> Rado
>
>
>
> P.Stavrinides wrote:
>>
>> This is a topic that has been discussed before on the list... I don't
>> disagree with you that there is a need to support server side redirects,
>> this is the key portion of my argument in favour of supporting them:
>>
>> "The two types of redirects are distinctly different and equally
>> important. RequestDipsatcher.forward() is the preferred redirection
>> approach for many banking sites / payment gateways etc because redirection
>> is performed at the server (so no need to use a session or querystring
>> parameters). Furthermore, you always deal with the same request/response
>> and have the ability to set attributes in the request which can be
>> retrieved even after redirecting... for example a simple page refresh will
>> update both redirect source and target (nice for a wizard type UI),
>> whereas with a sendRedirect() a new request/response is generated each
>> time. "
>>
>> See this old post for the full discussion:
>> http://www.nabble.com/t5%3A-forwarding-in-index-tt22694515.html#a23073223
>>
>>> I was also wondering how does Tapestry handle a custom ExceptionReport
>>> page?
>>> In this case, it also seems to perform a server-side forward or redirect
>>> (the URL of the original page remains displayed, while the custom
>>> ExceptionReport page is shown). But in this case, PageLinks and
>>> ActionLinks
>>> work properly.
>> Good question, you can dig through the source code to be certain, but at a
>> guess I think Tapestry simply renders markup and doesn't use a server side
>> redirect.
>>
>> Peter
>>
>> ----- Original Message -----
>> From: "immutability" <devli...@bielik.org>
>> To: users@tapestry.apache.org
>> Sent: Tuesday, 16 June, 2009 17:34:58 GMT +02:00 Athens, Beirut,
>> Bucharest, Istanbul
>> Subject: Re: T5.1: Request forwarding breaks page/actionlinks
>>
>>
>> Thank you for your reply Peter. I ran across the JIRA you posted, but I
>> feel
>> it was a bit different from whay I'm seeking - the other guy was getting
>> exceptions upon doing the forward. I agree there's not much use to do the
>> forwarding when Tapestry already has excellent mechanism to perform
>> redirection.
>>
>> But since both Tapestry-Acegi and Tapestry-Spring-Security are documenting
>> the user of acegi.accessDenied.url property, I'm wondering if there's a
>> way
>> to make it work properly with Tapestry pages? I mean - if Acegi/Spring
>> Security performs a server-side forward to redirect the user to the
>> "Access
>> Denied" page, then it would be nice to be able to use this with any
>> Tapestry
>> page. Otherwise the only way would be to create a page with no
>> Page/ActionLinks - so you could just as well use a plain static HTML page
>> for that. A Tapestry page with the standard webapp menu would be more
>> user-friendly.
>>
>> I was also wondering how does Tapestry handle a custom ExceptionReport
>> page?
>> In this case, it also seems to perform a server-side forward or redirect
>> (the URL of the original page remains displayed, while the custom
>> ExceptionReport page is shown). But in this case, PageLinks and
>> ActionLinks
>> work properly.
>>
>> Rado
>>
>>
>>
>>
>>
>> Server side forwarding does not work in Tapestry, and it seems there are
>> no
>> plans to implement it: there was a jira once for it
>> (https://issues.apache.org/jira/browse/TAP5-607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel)
>> but it was closed.
>>
>> regards,
>> Peter
>>
>> --
>> View this message in context:
>> http://www.nabble.com/T5.1%3A-Request-forwarding-breaks-page-actionlinks-tp24040558p24055691.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/T5.1%3A-Request-forwarding-breaks-page-actionlinks-tp24040558p24073841.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to