Results 1 to 4 of 4
- 11-05-2012, 07:29 PM #1
Member
- Join Date
- Dec 2010
- Posts
- 14
- Rep Power
- 0
Assign request variable in catch block
Hi All,
Is it valid to do following:
This one is not working for me. I am not able to get status variable in client when there is exception. However I am able to get diffStatusInfo when program runs without exception.Java Code:try{ //do something } catch(SomeException ex){ request.setAttribute("status", statusInfo); } request.setAttribute("status", diffStatusInfo);
Any suggestion/comment?
Thanks.
- 11-05-2012, 07:31 PM #2
Re: Assign request variable in catch block
You're going to have to be more specific than "not working". What does this do? What did you expect it to do?
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 11-05-2012, 09:29 PM #3
Member
- Join Date
- Dec 2010
- Posts
- 14
- Rep Power
- 0
Re: Assign request variable in catch block
I am expecting JSP will print
- statusInfo value if exception occur
- else diffStatusInfo if program run without exception.
- 11-06-2012, 01:13 AM #4
Similar Threads
-
Try Catch Block
By Jackbower in forum New To JavaReplies: 3Last Post: 05-06-2012, 07:00 AM -
Try/catch block
By swati.jyoti in forum New To JavaReplies: 5Last Post: 07-02-2009, 02:32 PM -
Question reg try/catch block
By nn12 in forum New To JavaReplies: 1Last Post: 09-16-2008, 05:56 PM -
Try Catch block issues
By kewlgeye in forum New To JavaReplies: 11Last Post: 04-29-2008, 07:10 AM -
try...catch block
By javaplus in forum New To JavaReplies: 3Last Post: 11-06-2007, 07:53 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks