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: email@hidden
- Date: Fri, 11 Jun 2004 10:22:49 -0500
You wrote:
Message: 7
Subject: Catching an exception thrown by invalid IP address
Date: Fri, 11 Jun 2004 17:22:49 +0530
From: "Tanmoy Roy" <email@hidden>
To: "WO DEV LIST (E-mail)" <email@hidden>
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 then I want to show a message that will
say "Subscription Submittted Successfully" which I have placed in a
WOConditional. 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. 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 . I
am a newbie in WO . Any suggestion will be saver.
Please help.
Thanks and Regards
Tanmoy Roy
Tanmoy, If I understand correctly, you say you are responding with an
empty page which will redirect to the thank you page via meta-refresh,
except you aren't sure the thank you page (or server) actually exists.
...The problem is that redirect or meta-refresh happens completely on the
browser. As a result, there is no exception for you to catch! The
"blank" page is always successfully found, and that's where your
involvement is finished.
I suggest you could either:
a) bring the thank you page into your WO app, in which case it will never
be "not available", or
b) pre-test the url you aren't sure about (using straight java code, such
as java.net.HttpURLConnection or ?), or
c) browser scripting ?
"a" makes the most sense to me.
Chris Wakefield
_______________________________________________
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.