<p>I'm using <b>Struts 2</b>.</p>

<p>I'd like to return from an Action to the page which invoked it.</p>

<p>Say I'm in page <strong>x.jsp</strong>, I invoke Visual action to change CSS preferences in the session; I want to return to <strong>x.jsp</strong> rather than to a fixed page (i.e. <strong>home.jsp</strong>)<br/></p>

<p>Here's the relevant <strong>struts.xml</strong> fragment:
<br/></p>

<pre>
&lt;action
   name="Visual"
   class="it.___.web.actions.VisualizationAction"&gt;
   &lt;result name="home"&gt;/pages/home.jsp&lt;/result&gt;
&lt;/action&gt;
</pre>

<p>Of course my <code>VisualizationAction.execute()</code> returns <strong>home</strong>.</p>

<p>Is there any "magic" constant (like, say, INPUT_PAGE) that I may return to do the trick?<br/></p>

<p>Must I use a more involved method (i.e. extracting the request page and forwarding to it)?<br/></p>

<p>T.I.A.</p>

```
```
return INPUT;
```
```
will do the trick. INPUT constant is defined in Action interface itself. It indicates that action needs more input.
By calling page if you meant the page that took you to the action input page, then your input page will have to store HTTP header "Referer" in the request scope for the Action.