Re: Catching an exception thrown by invalid IP address
Re: Catching an exception thrown by invalid IP address
- Subject: Re: Catching an exception thrown by invalid IP address
- From: "Jonathan Fleming" <email@hidden>
- Date: Fri, 11 Jun 2004 15:26:00 +0100
Thanks Sako, I'll forward this to Tanmoy Roy
From: "Sako!" <email@hidden>
To: "Jonathan Fleming" <email@hidden>
Subject: Re: Catching an exception thrown by invalid IP address
Date: Fri, 11 Jun 2004 16:18:26 +0200
you can catch any unexpected error with this code
public WOResponse handleException( Exception exception, WOContext context)
{
ErrorHandler nextPage = new ErrorHandler(exception, context);
return nextPage.generateResponse();
}
search the net to learn more about it
----- Original Message -----
From: "Jonathan Fleming" <email@hidden>
To: <email@hidden>
Cc: <email@hidden>
Sent: Friday, June 11, 2004 2:54 PM
Subject: RE: Catching an exception thrown by invalid IP address
> >From: "Tanmoy Roy" <email@hidden>
> >To: "WO DEV LIST (E-mail)" <email@hidden>
> >Subject: Catching an exception thrown by invalid IP address
> >Date: Fri, 11 Jun 2004 17:22:49 +0530
> >
> >Hi all,
> >
> >I am facing pecuiliar problem. I have web page which is having a submit
> >button which inserts data from user into database. On successful
submission
> >the user will be directed to a new "Thank You" page. Upto this point
> >everything is working fine. But what I want is that in case the "Thank
You"
> >page is not available
>
> Why would this not be available if it is a page/component in the app and
you
> have code that point to this by pageWithName()?
>
> then I want to show a message that will say "Subscription Submittted
> Successfully" which I have placed in a WOConditional.
>
> I suspect you have put that conditional in the Thank you page, if so
it's
> not going to show if the page is going to throw a 404 so that's
pointless.
>
> But I am unable to catch the exception when the designated URL page does
not
> exist. All it shows up is a blank page with the usual error messages for
not
> finding the URL.
>
> as I said above...
>
> What I am doing is the I have blank.wo containing a blank.html In this
> html's metatag I have specified that after 1 second the page will
redirect
> to the "Thank You" page . I am calling this blank HTML on submission by
the
> pageWithName() function .
>
> have you had a look at WOMetaRefresh(WOContext aContext); it'll be more
> dynamic for you
>
> I am a newbie in WO . Any suggestion will be saver.
>
> It may be that the url you are setting in the HTML metaRefresh tag is
> incorrect, try looking at Class WOContext in the API for ways of using a
> dynamic url
>
> HTH
> Jonathan :^)
>
>
> >
> >Please help.
> >
> >Thanks and Regards
> >
> >Tanmoy Roy
> >_______________________________________________
> >webobjects-dev mailing list | email@hidden
> >Help/Unsubscribe/Archives:
> >http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> >Do not post admin requests to the list. They will be ignored.
> >
>
> _________________________________________________________________
> Use MSN Messenger to send music and pics to your friends
> http://www.msn.co.uk/messenger
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
>
>
_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.