Pass url parameter to submit action Struts2 and display url result with same parameter
<p>I'm using struts2 for front end framework and found this issue which need to be resolved. So I view the page with edit privilege for this url </p>

<pre><code> [CONTEXT]/getUser.do?userId=1
</code></pre>

<p>But when I click Submit button, it seems struts render my request uri to getUser.do without any URL parameter. It also displayed in my result url </p>

<pre><code> [CONTEXT]/getUser.do
</code></pre>

<p><a href="https://stackoverflow.com/questions/13373760/how-to-pass-a-parameter-in-url-on-a-form-submit-in-struts2">From this SO solution</a> I knew I can use struts hidden tag. But using that tag will not change the result URL. I want the URL parameter passed to java action, as well as change the URL result.</p>

<p>If I using s:url tag, it need to know the value beforehand (is it?).</p>

<pre><code>&lt;s:url id="xyzUrl" action="xyz" includeContext="false"&gt;&lt;s:param name="user" value="george"/&gt;&lt;/s:url&gt; 
</code></pre>

<p>If using <code>s:url</code> tag, how can I pass dynamic value given by url parameter(in url browser) to the value argument of struts url tag? And can this solution resolve both of view mode(display page in the first time) and submit mode(submit the displayed page)?</p>