• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2Jquery plugin error handling

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

from below link i am calling one action class which will throw runtime exception.





since i am calling it through struts2jquery plugin widget , how to know some thing is happened at server side? right now it is not showing any error.

Rgds
Peter

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts swallows unhandled exceptions. The typical way to handle a problem at the Action level is to add an ActionError instance and use the actionerror tag to print the errors out on the JSP page.
You should also print the exception and stack trace out to a log file (along with the other debugging information you are already logging, right???) so you will have an idea as to what happened to create the problem
 
James Peter
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

thanks for reply. if i call action using <sj:a like below one then how can i receive actionerror object?
can we attach any javascript function to this <sj:a so that when we get action error we can read it?



for example if we use <sj:submit then we can specify a javascript function and handle any action errors and formfield errors.

validateFunction="customeValidation"

Rgds
Peter
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic