I am using <s:url>
to create a URL like removeAction.action?id=10
which should be used by the action attribute in the <s:form>
element.
The issue here is when the <s:form>
converts to <form>
element I can only see the action attribute value as action="/project/removeAction.action"
. The id parameter is getting trimmed. The result I wanted is action="/project/removeAction.action?id=10"
<s:url var="actionUrl" action="removeAction" includeContext="false">
<s:param name="id" value="%{id}" />
</s:url>
<s:form action="%{actionUrl}" method="post" enctype="multipart/form-data" >
<div>
<s:file name="imgUpload"/>
<s:submit> upload </submit>
</div>
</s:form>
Recently I upgrade the struts2 core version to 2.3.12 and I am getting this issue. This issue starts after version 2.3.4.1
And I don't want to use a hidden
attribute to pass the parameter as this parameter get lost when the file size is big to upload.
Is there any solution for this?