Update Struts dependencies to 6.x.x.
Remove the following plugin dependencies because they were dropped and aren't supported anymore:
Support for Velocity was moved into dedicated plugins, also Velocity based tags were moved into the new plugin, see for more details.
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider
became abstract, please use org.apache.struts2.config.StrutsXmlConfigurationProvider
instead.
com.opensymphony.xwork2.conversion.TypeConversionException
was replaced by org.apache.struts2.conversion.TypeConversionException
.
com.opensymphony.xwork2.XWorkException
was replaced by org.apache.struts2.StrutsException
.
All Xwork constans had been already deprecated, with this version all of them have been removed and Struts constants have been used instead. See tickets and with the linked PRs for the exact changes. Below is a list of removed constants and Struts substitute:
Old constant | New constant |
---|---|
collectionConverter | struts.converter.collection |
dateConverter | struts.converter.date |
numberConverter | struts.converter.number |
stringConverter | struts.converter.string |
arrayConverter | struts.converter.array |
devMode | struts.devMode |
logMissingProperties | struts.ognl.logMissingProperties |
enableOGNLExpressionCache | struts.ognl.enableExpressionCache |
enableOGNLEvalExpression | struts.ognl.enableEvalExpression |
reloadXmlConfiguration | struts.configuration.xml.reload |
allowStaticMethodAccess | struts.ognl.allowStaticMethodAccess |
xwork.loggerFactory | <not used any more> |
ognlExcludedClasses | struts.excludedClasses |
ognlExcludedPackageNamePatterns | struts.excludedPackageNamePatterns |
ognlExcludedPackageNames | struts.excludedPackageNames |
additionalExcludedPatterns | struts.additional.excludedPatterns |
additionalAcceptedPatterns | struts.additional.acceptedPatterns |
overrideExcludedPatterns | struts.override.excludedPatterns |
overrideAcceptedPatterns | struts.override.acceptedPatterns |
struts.xwork.chaining.copyErrors | struts.chaining.copyErrors |
struts.xwork.chaining.copyFieldErrors | struts.chaining.copyFieldErrors |
struts.xwork.chaining.copyMessages | struts.chaining.copyMessages |
xwork.autoGrowCollectionLimit | struts.ognl.autoGrowthCollectionLimit |
objectFactory.classloader | struts.objectFactory.classloader |
Constant name | Description |
---|---|
struts.i18n.search.defaultbundles.first | Allows search in default bundles first, read more in the docs |
After migrating to the latest Freemarker (which enables auto-escaping by default) you should stop using ?html
in your custom tags and freemarker based pages. Also when embedding a tag in <s:a>,
<s:submit>
and <s:component>
tags like in the example below:
<s:a href="%{...}"> <img src="<s:url value='/images/icon_waste_sml.png'/>"/> </s:a> |
the inner tag can be automatically escaped (if needed), set "escapeHtmlBody" attribute to "true" as below:
<s:a href="%{...}" escapeHtmlBody="true"> <img src="<s:url value='/images/icon_waste_sml.png'/>"/> </s:a> |
There is a global flag struts.ui.escapeHtmlBody
which controls this behaviour for all the tags. Tag's attribute takes precedence over the global flag. It's related to and .
Users reported it was necessary for them to remove temp/work directory of their ApplicationServer/ServletContainer. Likely to force server to recompile JSPs.