You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Harish Krishnaswamy <hk...@comcast.net> on 2004/03/19 18:00:14 UTC
Asset service exception handling
How do people handle exceptions from the Asset service? I understand
that the Asset service runs in its own request cycle and I can capture
the exception and log it but how would I redirect the client to the
exception page? Should I throw a redirect exception because the page has
already been rendered?
-Harish
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Asset service exception handling
Posted by Harish Krishnaswamy <hk...@comcast.net>.
My problem (although not a huge one) is primarily with the Script component.
-Harish
Mind Bridge wrote:
>Just to mention: since Image is component, one could probably replace it
>with a special implementation that does something like what is needed using
>JavaScript and dynamic HTML, but I am not sure it will go in the 'elegant'
>category :)
>
>-----Original Message-----
>From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
>Sent: Monday, March 22, 2004 2:06 PM
>To: Tapestry users
>Subject: Re: Asset service exception handling
>
>
>Not to my knowledge. I'd be amazed if someone could come up with
>something elegant for this scenario!
>
> Erik
>
>On Mar 21, 2004, at 11:32 AM, Harish Krishnaswamy wrote:
>
>
>
>>Hm, that's a little ungraceful. So the page would seem to have no
>>problem rendering but would not function properly. Isn't there any
>>other option to handle this at all?
>>
>>-Harish
>>
>>Erik Hatcher wrote:
>>
>>
>>
>>>A RedirectException wouldn't work in this case. I suggest it should
>>>fail as it does now - and that asset would break on client and the
>>>image would not load (for example).
>>>
>>>You have no way of redirecting the client if the browser is
>>>requesting an image or javascript file in a separate request from the
>>>main page.
>>>
>>> Erik
>>>
>>>On Mar 19, 2004, at 11:00 AM, Harish Krishnaswamy wrote:
>>>
>>>
>>>
>>>>How do people handle exceptions from the Asset service? I understand
>>>>that the Asset service runs in its own request cycle and I can
>>>>capture the exception and log it but how would I redirect the client
>>>>to the exception page? Should I throw a redirect exception because
>>>>the page has already been rendered?
>>>>
>>>>-Harish
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail:
>>>>tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Asset service exception handling
Posted by Mind Bridge <mi...@yahoo.com>.
Just to mention: since Image is component, one could probably replace it
with a special implementation that does something like what is needed using
JavaScript and dynamic HTML, but I am not sure it will go in the 'elegant'
category :)
-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Monday, March 22, 2004 2:06 PM
To: Tapestry users
Subject: Re: Asset service exception handling
Not to my knowledge. I'd be amazed if someone could come up with
something elegant for this scenario!
Erik
On Mar 21, 2004, at 11:32 AM, Harish Krishnaswamy wrote:
> Hm, that's a little ungraceful. So the page would seem to have no
> problem rendering but would not function properly. Isn't there any
> other option to handle this at all?
>
> -Harish
>
> Erik Hatcher wrote:
>
>> A RedirectException wouldn't work in this case. I suggest it should
>> fail as it does now - and that asset would break on client and the
>> image would not load (for example).
>>
>> You have no way of redirecting the client if the browser is
>> requesting an image or javascript file in a separate request from the
>> main page.
>>
>> Erik
>>
>> On Mar 19, 2004, at 11:00 AM, Harish Krishnaswamy wrote:
>>
>>> How do people handle exceptions from the Asset service? I understand
>>> that the Asset service runs in its own request cycle and I can
>>> capture the exception and log it but how would I redirect the client
>>> to the exception page? Should I throw a redirect exception because
>>> the page has already been rendered?
>>>
>>> -Harish
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> tapestry-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Asset service exception handling
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Not to my knowledge. I'd be amazed if someone could come up with
something elegant for this scenario!
Erik
On Mar 21, 2004, at 11:32 AM, Harish Krishnaswamy wrote:
> Hm, that's a little ungraceful. So the page would seem to have no
> problem rendering but would not function properly. Isn't there any
> other option to handle this at all?
>
> -Harish
>
> Erik Hatcher wrote:
>
>> A RedirectException wouldn't work in this case. I suggest it should
>> fail as it does now - and that asset would break on client and the
>> image would not load (for example).
>>
>> You have no way of redirecting the client if the browser is
>> requesting an image or javascript file in a separate request from the
>> main page.
>>
>> Erik
>>
>> On Mar 19, 2004, at 11:00 AM, Harish Krishnaswamy wrote:
>>
>>> How do people handle exceptions from the Asset service? I understand
>>> that the Asset service runs in its own request cycle and I can
>>> capture the exception and log it but how would I redirect the client
>>> to the exception page? Should I throw a redirect exception because
>>> the page has already been rendered?
>>>
>>> -Harish
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> tapestry-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Asset service exception handling
Posted by Harish Krishnaswamy <hk...@comcast.net>.
Hm, that's a little ungraceful. So the page would seem to have no
problem rendering but would not function properly. Isn't there any other
option to handle this at all?
-Harish
Erik Hatcher wrote:
> A RedirectException wouldn't work in this case. I suggest it should
> fail as it does now - and that asset would break on client and the
> image would not load (for example).
>
> You have no way of redirecting the client if the browser is requesting
> an image or javascript file in a separate request from the main page.
>
> Erik
>
> On Mar 19, 2004, at 11:00 AM, Harish Krishnaswamy wrote:
>
>> How do people handle exceptions from the Asset service? I understand
>> that the Asset service runs in its own request cycle and I can
>> capture the exception and log it but how would I redirect the client
>> to the exception page? Should I throw a redirect exception because
>> the page has already been rendered?
>>
>> -Harish
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Asset service exception handling
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
A RedirectException wouldn't work in this case. I suggest it should
fail as it does now - and that asset would break on client and the
image would not load (for example).
You have no way of redirecting the client if the browser is requesting
an image or javascript file in a separate request from the main page.
Erik
On Mar 19, 2004, at 11:00 AM, Harish Krishnaswamy wrote:
> How do people handle exceptions from the Asset service? I understand
> that the Asset service runs in its own request cycle and I can capture
> the exception and log it but how would I redirect the client to the
> exception page? Should I throw a redirect exception because the page
> has already been rendered?
>
> -Harish
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org