Avatar billede fredand Forsker
28. maj 2009 - 16:55 Der er 1 løsning

Error in Struts

Hello!

I got a ActionForm class that might throw an exception when it is initieted in Struts 1.1.

How ever if this happens and a 500-code is returned we have specied that a ceratin page should be shown.

The page uses html:error.

I now would like to catch the exception in the constructor of the ActionForm, and before I throw the Exception further on I would like to set the error accessible to html:error.

But I do not find any way to put a proper error message like:

saveErrors(HttpServletRequest request, ActionError errors)

...that is found in the Action class: 

So if you got any idea how to do this please let me know!

Best regards
Fredrik
Avatar billede fredand Forsker
03. juni 2009 - 12:13 #1
I have not found any solution for this.
So I think we close this one!

Best regards
Fredrik
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester