File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

with out using global execeptions tag

 
ramesh kothakonda
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi javaranchers,

with out using global exceptions tag how to handle an exception from struts framework while we are connecting to a database

thanking you,
k.ramesh
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're not using global exceptions, the best way to handle an exception is to catch it in the execute method of your Action class. Once you've caught it, you can ether put a message in theActionMessages object and forward to the same JSP where you can display the error message with an <html:errors> tag, or you can forward to a specific error JSP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic