Struts 2.1.8
I had one page in the application I'm working on which was really
really slow... it was taking 4-5 seconds to render the jsp page.
It's a very simple page, just a list of 10 to 15 items that are
iterated over and each one gets a form with one hidden field and a
button.
It appears it's the <s:form> tag that is is culprit.
Here is the original:
<s:iterator value="#action.userConnectionsPaged">
<s:if test="typeNoConnection">
<div class="section">
<s:form action="AddConnection" theme="simple">
<s:hidden name="userId" value="%{userId}" theme="simple"/>
<s:submit cssClass="button" key="FindConnections.action.addConnection"
theme="simple"/>
</s:form>
</div>
</s:if>
</s:iterator>
Here what I replaced it with to make it run fast:
<s:iterator value="#action.userConnectionsPaged">
<s:if test="typeNoConnection">
<div class="section">
<form action='<s:url action="AddConnection" />' >
<input type="hidden" name="userId" value='${userId}' />
<input type="submit" name="FindConnections.action.addConnection"
value='<s:text name="FindConnections.action.addConnection"/>'
class="button"/>
</form>
</div>
</s:if>
</s:iterator>
That was the only change I made to the page and now there is no
noticeable delay in rendering the page.
Anyone have any idea what would cause the <s:form> tag to take so
long? Is there a bug or something with it?
Is there any additional information I can provide to help someone
figure out what is going on?
I've seen reports on this mailing list of slow rendering of jsp pages
but never encountered myself before.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]