Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need your suggestion on ErrorHandling

 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IN our application, we are using Struts validation framework to validate user's input and and are able to show the errormessages as Javascript pop-ups. Its working fine
Now, How to handle applciation erros and exceptions...
Something like, if the user requests for somethings, which is not available in the database...we need to show that records are available

I understood the concept of using "ActionErrors - </html:erros>" mechanism..
But, can we display the error messages as Javascript pop-ups using the above machanism? Our clinet is intersted to see all the messages as JavaSctipt pop-ups... IS it possible? If so, please adivse me on how go about it..
[ November 10, 2003: Message edited by: manasa teja ]
 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heres the deal. When there are errors at the time of validation, struts uses the mapping.getInputForward() to send the user to the error page that he came from. For your case, you wanna send the user a popup saying that there was an application error. This should be possible if you do the same thing as struts, sending the user to the input page in case of application errors, having a document onLoad js function on the page which checks for the Errors in the scope(session/request wherever u set it) and then constructing an alert box to pop up when the page loads. I have never done this myself but would imagine it should work.
Lemme know if it does.
Sahil
 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will try to implement hat u suggested..
Frineds,
Any more suggestions on this...
 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone.. please please suggest me on this
 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody.. please help me on this!!
Waiting for your advise on this
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic