You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steve Swinsburg <s....@lancaster.ac.uk> on 2009/02/02 18:03:13 UTC

passing values to own exception pages

Hi all,

I have specified some pages that I would like rendered in place of the  
Wicket exception pages, in deployment mode, like so:

/* if Session expires, show this error instead */
getApplicationSettings 
().setPageExpiredErrorPage(SessionExpiredPage.class);
		
/* if internal error occurs, show this page instead */
getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);

I'm not sure how to get the actual class, cause, stacktrace etc passed  
into the pages though. I'd like to capture it because we have a  
standardised way of presenting the error to the user (and it needs to  
be emailed etc).


cheers,
Steve

---
Steve Swinsburg
Portal Systems Developer
Centre for e-Science
Lancaster University
Lancaster
LA1 4YT

email: s.swinsburg@lancaster.ac.uk
phone: +44 (0) 1524 594870








Re: passing values to own exception pages

Posted by Steve Swinsburg <s....@lancaster.ac.uk>.
Ok thanks. I'll take care of the redirects in that page then.


cheers,
Steve






On 2 Feb 2009, at 17:15, Igor Vaynberg wrote:

> no, for page expired error there is no exception it goes straight to  
> the page
>
> -igor
>
> On Mon, Feb 2, 2009 at 9:13 AM, Steve Swinsburg
> <s....@lancaster.ac.uk> wrote:
>> thanks igor. does that work for the other types of errors like
>> SessionExpired etc? Not sure if I need to capture that one yet  
>> though, but I
>> will need to redirect with a page ref (url).
>>
>>
>> cheers,
>> Steve
>>
>>
>>
>>
>>
>>
>> On 2 Feb 2009, at 17:05, Igor Vaynberg wrote:
>>
>>> on requestcycle.onruntimeexception you can redirect to your error  
>>> page
>>> passing in the exception.
>>>
>>> -igor
>>>
>>> On Mon, Feb 2, 2009 at 9:03 AM, Steve Swinsburg
>>> <s....@lancaster.ac.uk> wrote:
>>>>
>>>> Hi all,
>>>> I have specified some pages that I would like rendered in place  
>>>> of the
>>>> Wicket exception pages, in deployment mode, like so:
>>>> /* if Session expires, show this error instead */
>>>>
>>>> getApplicationSettings 
>>>> ().setPageExpiredErrorPage(SessionExpiredPage.class);
>>>>
>>>> /* if internal error occurs, show this page instead */
>>>> getApplicationSettings 
>>>> ().setInternalErrorPage(InternalErrorPage.class);
>>>> I'm not sure how to get the actual class, cause, stacktrace etc  
>>>> passed
>>>> into
>>>> the pages though. I'd like to capture it because we have a  
>>>> standardised
>>>> way
>>>> of presenting the error to the user (and it needs to be emailed  
>>>> etc).
>>>>
>>>> cheers,
>>>> Steve
>>>> ---
>>>> Steve Swinsburg
>>>> Portal Systems Developer
>>>> Centre for e-Science
>>>> Lancaster University
>>>> Lancaster
>>>> LA1 4YT
>>>> email: s.swinsburg@lancaster.ac.uk
>>>> phone: +44 (0) 1524 594870
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


Re: passing values to own exception pages

Posted by Igor Vaynberg <ig...@gmail.com>.
no, for page expired error there is no exception it goes straight to the page

-igor

On Mon, Feb 2, 2009 at 9:13 AM, Steve Swinsburg
<s....@lancaster.ac.uk> wrote:
> thanks igor. does that work for the other types of errors like
> SessionExpired etc? Not sure if I need to capture that one yet though, but I
> will need to redirect with a page ref (url).
>
>
> cheers,
> Steve
>
>
>
>
>
>
> On 2 Feb 2009, at 17:05, Igor Vaynberg wrote:
>
>> on requestcycle.onruntimeexception you can redirect to your error page
>> passing in the exception.
>>
>> -igor
>>
>> On Mon, Feb 2, 2009 at 9:03 AM, Steve Swinsburg
>> <s....@lancaster.ac.uk> wrote:
>>>
>>> Hi all,
>>> I have specified some pages that I would like rendered in place of the
>>> Wicket exception pages, in deployment mode, like so:
>>> /* if Session expires, show this error instead */
>>>
>>> getApplicationSettings().setPageExpiredErrorPage(SessionExpiredPage.class);
>>>
>>> /* if internal error occurs, show this page instead */
>>> getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);
>>> I'm not sure how to get the actual class, cause, stacktrace etc passed
>>> into
>>> the pages though. I'd like to capture it because we have a standardised
>>> way
>>> of presenting the error to the user (and it needs to be emailed etc).
>>>
>>> cheers,
>>> Steve
>>> ---
>>> Steve Swinsburg
>>> Portal Systems Developer
>>> Centre for e-Science
>>> Lancaster University
>>> Lancaster
>>> LA1 4YT
>>> email: s.swinsburg@lancaster.ac.uk
>>> phone: +44 (0) 1524 594870
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>

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


Re: passing values to own exception pages

Posted by Steve Swinsburg <s....@lancaster.ac.uk>.
thanks igor. does that work for the other types of errors like  
SessionExpired etc? Not sure if I need to capture that one yet though,  
but I will need to redirect with a page ref (url).


cheers,
Steve






On 2 Feb 2009, at 17:05, Igor Vaynberg wrote:

> on requestcycle.onruntimeexception you can redirect to your error page
> passing in the exception.
>
> -igor
>
> On Mon, Feb 2, 2009 at 9:03 AM, Steve Swinsburg
> <s....@lancaster.ac.uk> wrote:
>> Hi all,
>> I have specified some pages that I would like rendered in place of  
>> the
>> Wicket exception pages, in deployment mode, like so:
>> /* if Session expires, show this error instead */
>> getApplicationSettings 
>> ().setPageExpiredErrorPage(SessionExpiredPage.class);
>>
>> /* if internal error occurs, show this page instead */
>> getApplicationSettings 
>> ().setInternalErrorPage(InternalErrorPage.class);
>> I'm not sure how to get the actual class, cause, stacktrace etc  
>> passed into
>> the pages though. I'd like to capture it because we have a  
>> standardised way
>> of presenting the error to the user (and it needs to be emailed etc).
>>
>> cheers,
>> Steve
>> ---
>> Steve Swinsburg
>> Portal Systems Developer
>> Centre for e-Science
>> Lancaster University
>> Lancaster
>> LA1 4YT
>> email: s.swinsburg@lancaster.ac.uk
>> phone: +44 (0) 1524 594870
>>
>>
>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


Re: passing values to own exception pages

Posted by Igor Vaynberg <ig...@gmail.com>.
on requestcycle.onruntimeexception you can redirect to your error page
passing in the exception.

-igor

On Mon, Feb 2, 2009 at 9:03 AM, Steve Swinsburg
<s....@lancaster.ac.uk> wrote:
> Hi all,
> I have specified some pages that I would like rendered in place of the
> Wicket exception pages, in deployment mode, like so:
> /* if Session expires, show this error instead */
> getApplicationSettings().setPageExpiredErrorPage(SessionExpiredPage.class);
>
> /* if internal error occurs, show this page instead */
> getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);
> I'm not sure how to get the actual class, cause, stacktrace etc passed into
> the pages though. I'd like to capture it because we have a standardised way
> of presenting the error to the user (and it needs to be emailed etc).
>
> cheers,
> Steve
> ---
> Steve Swinsburg
> Portal Systems Developer
> Centre for e-Science
> Lancaster University
> Lancaster
> LA1 4YT
> email: s.swinsburg@lancaster.ac.uk
> phone: +44 (0) 1524 594870
>
>
>
>
>
>
>

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