struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Greene <>
Subject Struts 2 Tags / Freemarker performance
Date Fri, 15 Jan 2010 00:48:43 GMT
I've been evaluating struts and have found some troubling
performance bottlenecks relating to the struts tag and freemarker. I have a
JSP that has 7 struts2 tags in it. (A simple signup form)

I noticed in my load testing that the throughput of this page was 4-5 times
slower under load (100 concurrent threads) than a JSP page with no struts2
tags on it. I cracked open my profiler and noticed the majority of the time
spent in a page request was within freemarker. I uploaded a screen shot from
my profiler here : . I've seen a lot of
discussion on the mailing lists about performance related issues and the
recommendations that came along with them to address it. I believe I've done
everything I can to tune this simple page. I would appreciate any feedback
if there is something I am missing. Or is this a known issue?

<!-- Constants -->
<constant name="struts.devMode" value="false" />
 <constant name="struts.i18n.encoding" value="UTF-8" />
 <constant name="struts.multipart.maxSize" value="2000000" />
<constant name="struts.ui.theme" value="css_xhtml" />
 <constant name="struts.freemarker.templatesCache" value="true" />
<constant name="struts.ui.templateDir" value="template"/>
 <constant name="struts.enable.SlashesInActionNames" value="true" />
<constant name="struts.convention.action.disableScanning" value="true" />
 <constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.url.includeParams" value="all" />

<!-- Configuration for the default package. -->
<package name="default" extends="struts-default">
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"

<!-- Copied from struts-default.xml and changed validation exclude methods
 <interceptor-stack name="defaultStack">
<interceptor-ref name="exception" />
 <interceptor-ref name="alias" />
<interceptor-ref name="servletConfig" />
 <interceptor-ref name="prepare" />
<interceptor-ref name="chain" />
 <interceptor-ref name="debugging" />
<interceptor-ref name="profiling" />
 <interceptor-ref name="scopedModelDriven" />
<interceptor-ref name="modelDriven" />
 <interceptor-ref name="fileUpload" />
<interceptor-ref name="checkbox" />
 <interceptor-ref name="staticParams" />
<interceptor-ref name="params">
 <param name="excludeParams">dojo\..*</param>
 <interceptor-ref name="conversionError" />
<interceptor-ref name="validation">
 <param name="excludeMethods">cancel,delete,list</param>
 <interceptor-ref name="workflow">
<param name="excludeMethods">input,back,cancel,browse</param>
<interceptor-stack name="fileUploadStack">
 <interceptor-ref name="fileUpload" />
<interceptor-ref name="defaultStack" />
<action name="new" class="testapp.CreateAccount" method="show">
 <result name="input" type="tiles">account.create</result>

JSP Page (snippet):
 <s:form action="create" >
<s:textfield name="" cssClass="txt-input small" />

<s:textfield name="" cssClass="txt-input small" />

<p><label>Site Address</label>
<s:textfield name="account.subDomain" cssClass="txt-input small" />


<s:password name="user.password" cssClass="txt-input small"  />

<p><label>Confirm Password</label>
<s:password name="user.passwordConfirm" cssClass="txt-input small" />

<s:submit cssClass="button"/>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message