hi guys, got a very simple question. i've got a SaveAction which can be invoked via the url /Save.do from basically anywhere in my struts app. naturally, its mapping configuration is quite terse:

<action path="/Save" type="mypackage.SaveAction"/>

works fine, but here's the issue - at the end of the action, i want to send the user back to wherever they came from, maybe with a little "save successful" or "save failed" message. I can't do this:

return new ActionForward(mapping.getInput());

i get an npe when i try, presumably because i didn't declare an explicit input path for the action in struts-config. i can of course do this:

response.sendRedirect(request.getHeader("Referer"));

(with appropriate failure condition if the browser doesn't send Referer headers) but that doesn't seem very strutsy. is there a recommended practice in this regard?

- donald


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to