The problem is that the "Submit" button on a form, generated using the <sx:submit> tag, appears to do absolutely nothing when clicked on in the Chrome browser.
The jsp page source looks something like this:
<%@taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="/struts-dojo-tags" prefix="sx" %>
<div>
<table>
<s:form action="myFormAction">
<thead>
<tr><th>My Form</tr></th>
</thead>
<tbody>
<tr>
<th>Value 1</th>
<td><s:property value="%{mything.Value1}" /></td>
</tr>
<tr>
<th>Text 1: </th>
<td><s:textfield name="someName" value="%{mything.SomeName}" /></td>
</tr>
<tr>
<th>Text 2: </th>
<td><s:textfield name="someName2" value="%{mything.SomeName2}" /></td>
</tr>
<tr>
<th colspan="2">
**<sx:submit cssClass="button" value="Save" executeScripts="true" />**
</th>
</tr>
</tbody>
</s:form>
</table>
</div>
I opened up dev tools in Chrome and clicked the button, because usually when a button appears to do nothing, there's actually a JavaScript error being thrown. But absolutely nothing appeared to be happening. No error. I put the application into Debug mode (running in Eclipse 2022-12 (4.26.0), ApacheTomcat 9.0.24) and placed a breakpoint on the method associated with the Dojo action, as specified in the struts xml file. Nothing happened.
I opened up the application in Internet Explorer, and it works just fine. I inspected the HTML generated in IE and it is different than that generated in Chrome:
in IE:
<input class="button" id="widget_1597536618" type="submit" __doClobber__="true" __clobberAttrs__="onclick$joinpoint,onclick$joinpoint$method,onclick" dojoType="struts:Bind" executeScripts="true" ajaxAfterValidation="false" events="onclick" onclick$joinpoint$method="function(){}" onclick$joinpoint="[object Object]" value="Save" />
In Chrome:
<input type="submit" dojotype="struts:Bind" events="onclick" value="Save" validate="false" ajaxafterValidation="false" id="widget_832070295" class="button" executescripts="true">
So, I am not sure why these two things are generated differently, but I know that the button works and executes the appropriate code in IE, but it refuses to do anything at all in Chrome.
EDIT: I should also add that we are using Struts 2.1.8.
ANSWER It has nothing to do with Struts or Chrome. This table/form is malformed.
Instead of
It needed to be
As I was typing this question, it occurred to me that something was out of place about that structure. But this application is so old, and has been working fine as written for so long, that I just blew it off as "that cannot possibly be why this isn't working."
So, remember kids, trust your instincts. And if you think "that can't be the answer", check it out anyway.