This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to handle the Exception...its Urgent

 
Jhonson David
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys..

if this query posted early..sorry plz..again to post.ok..
my problem is..

i have to handle the exception. if any exception occured then, one error page should be opened and gives that error on that page.

for ex..
try{
URL xmlConnection = new URL(EncodedPath);
HttpURLConnection urlConn = (HttpURLConnection)xmlConnection.openConnection();
} catch(ConnectException ce)

this exception caught and redirect to the one error page how to handle it in jsf..

plz give ur valueable suggestions..its very Urgent..

thanx in adv with regards
DJ
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jhonson David:

try{
URL xmlConnection = new URL(EncodedPath);
HttpURLConnection urlConn = (HttpURLConnection)xmlConnection.openConnection();
} catch(ConnectException ce)

this exception caught and redirect to the one error page how to handle it in jsf..


If this is happening in an action method, return some string and use navigation support provided by faces-config.xml OR you may use NavigationHandler class to redirect it to jsp page.

Configuring Navigation Rules
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!