In my Struts2 application, I want to pass a hidden value from a JSP file to an Action class. This will be the sole purpose of this JSP page, so in fact it will act as a redirection page, with a hidden value in it. My code:
<form action="editexperiment" method="post">
<s:hidden name="id" value="%{id}"/>
<button type="submit">Submit</button>
</form>
The above code works, but obviously I do not want to click on a submission button, so how can I remove it and auto-submit this (hidden) form? I know I can achieve this easily with JavaScript, but that's not my preferred solution.