struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <>
Subject [S2 Tip] Always set devMode to false in production
Date Fri, 16 Mar 2007 13:04:55 GMT
In the Struts 2.0.6 release, we made the mistake of setting devMode to
true in some of the example applications. As a result, some developers
copied the setting, and then wondered why their Struts 2 application
seemed sluggish!

As of Struts 2.0.7 (coming soon), we've added a Performance Tuning
page to the documentation. Here's the highlights:

* Turn off logging and devMode
* Do not use interceptors you do not need
* Use the correct HTTP headers (Cache-Control & Expires)
* Copy the static content from the Struts 2 jar when using the Ajax
theme (Dojo) or the Calendar tag
* Create a file in your WEB-INF/classes directory
* Copy the /template directory from the Struts 2 jar in your WEB_APP root
* When overriding a theme, copy all necessary templates to the theme directory
* Do not create sessions unless you need them
* When using FreemarkerResult, try to use the Freemarker equivalent
rather than using the JSP tags

For the nitty-gritty, visit the latest version of the page :


Kudos to Philip Luppens for starting the tuning page. If you have any
tuning tips of your own, feel free to post comments directly to the
page. (Gotta love Confluence!)

-- HTH, Ted

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message