Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception in struts handling in JSP

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can we catch expections in struts using JSP's
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64844
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brett Han
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I apologize - I posted the previous message in the wrong thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic