| Author |
Need your suggestion on ErrorHandling
|
manasa teja
Ranch Hand
Joined: May 27, 2002
Posts: 325
|
|
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 ]
|
MT
|
 |
sandy gupta
Ranch Hand
Joined: Jan 30, 2001
Posts: 228
|
|
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
|
Adios
|
 |
manasa teja
Ranch Hand
Joined: May 27, 2002
Posts: 325
|
|
I will try to implement hat u suggested.. Frineds, Any more suggestions on this...
|
 |
manasa teja
Ranch Hand
Joined: May 27, 2002
Posts: 325
|
|
|
Anyone.. please please suggest me on this
|
 |
manasa teja
Ranch Hand
Joined: May 27, 2002
Posts: 325
|
|
Somebody.. please help me on this!! Waiting for your advise on this
|
 |
 |
|
|
subject: Need your suggestion on ErrorHandling
|
|
|