Hello, I need to change the target attribute of a form element (HTML) before calling the forward() method of a RequestDispatcher object from a servlet Admin in a MVC design pattern, That's because when I got a database error, I need to forward to an error page in a diferent frame from that the original form target specify. May be that's impossible but any idea or alternative solution would be thanks.
i'm not sure i understood what you wanna do, but in case i did... if you get an exception thrown you wanna redirect your page to some kind of "error" page. you can do it with your web.xml file (deployment descriptor). use this tag: <error-page> <exception-type>SomeKindOfException</exception-type> <location>/iwrotebadcode.jsp</location> </error-page> try it.
Joined: Mar 06, 2002
thank you, I've solved my problem using an Error Applet that shows another page in a new window if an error ocurrs in the server side. Thank you again