dcsimg
Struts
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramona_Ciucurita
Posted On:   Friday, September 27, 2002 07:12 AM

I want to return to the same page from the action class with an error?

Re: Struts

Posted By:   Brian_Kapellusch  
Posted On:   Friday, September 27, 2002 07:33 AM

Here's an example of something I was just doing this morning:



ActionErrors ae = new ActionErrors();
ae.add("zipCode", new ActionError("error.zipCode.notFound"));
this.saveErrors(request, ae);
return (new ActionForward(mapping.getInput()));



mapping.getInput() returns a String, and you create a new ActionForward with that String and return it.
About | Sitemap | Contact