In my struts2 Application I have a JavaScript function to do the cancel. this method is in the header and only do a window.location to my return URL. Since we did a migration from version 2.0.11 of struts 2.3.8 release, it no longer works. When I look at the generated HTML code we see that fails to interpret the tag s:property because the URL is empty. I do not see what does not work.
in my IDE :
function cancel() {
if (!isModified || (isModified && askConfirmCancel())) {
window.location.replace('<s:property value="#urlBack"/>');
}
}
result with Firebug :
function cancel() {
if (!isModified || (isModified && askConfirmCancel())) {
window.location.replace('');
}
}
in JSP file :
<tr>
<td height="6%"align="center">
<s:submit cssClass="button" key="common.initDelegate.label" align="center" theme="simple"/>
<s:url id="urlBack" action="myAction" includeParams="none" escapeAmp="false">
<s:param name="period.periodId" value="%{period.periodId}"></s:param>
</s:url>
<input type="button" onclick="javascript:cancel()" value="<s:text name="common.button.cancel"/>"/>
</td>
</tr>