my dog learned polymorphism*
The moose likes Struts and the fly likes exception in struts handling in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "exception in struts handling in JSP" Watch "exception in struts handling in JSP" New topic
Author

exception in struts handling in JSP

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
how can we catch expections in struts using JSP's
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
exceptions can be handled declaratively globally or locally (per action mapping) by defining them in struts-config.xml. this is documented in the struts user guide on apache web site. you essentially map an exception to a message key and a forward (jsp, tile, action mapping) and use html:errors to display the message in your jsp. in this sense, jsp does NOT handle the exception.

you can also define exception handlers for your exceptions.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Brett Han
Greenhorn

Joined: May 17, 2005
Posts: 10
Thanks for the help - that was exactly what I was doing, but I found my problem. The action was actually completing before the property was updated in my form bean - so at the time the page was refreshed, it actually _was_ correct (the items were deleted immediately after).

Thanks again.
Brett Han
Greenhorn

Joined: May 17, 2005
Posts: 10
I apologize - I posted the previous message in the wrong thread.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception in struts handling in JSP
 
Similar Threads
Struts interview questions
InnerHTML and struts tags
Action class in Struts
URL rewrite to maintain session state
Eclipse IDE - How to set up a Struts 2 project