struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject how to strutsly send the user back to the last URL
Date Thu, 27 Mar 2003 18:47:25 GMT
hi guys, got a very simple question. i've got a SaveAction which can be 
invoked via the url / 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:


(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:
For additional commands, e-mail:

View raw message