Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyWW-4792
and
Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyWW-5000
with the linked PRs for the exact changes. Below is a list of removed constants and Struts substitute:

Old constantNew constant
collectionConverter struts.converter.collection
dateConverterstruts.converter.date
numberConverterstruts.converter.number
stringConverterstruts.converter.string
arrayConverterstruts.converter.array
devModestruts.devMode
logMissingPropertiesstruts.ognl.logMissingProperties
enableOGNLExpressionCachestruts.ognl.enableExpressionCache
enableOGNLEvalExpressionstruts.ognl.enableEvalExpression
reloadXmlConfigurationstruts.configuration.xml.reload
allowStaticMethodAccessstruts.ognl.allowStaticMethodAccess
xwork.loggerFactory<not used any more>
ognlExcludedClassesstruts.excludedClasses
ognlExcludedPackageNamePatternsstruts.excludedPackageNamePatterns
ognlExcludedPackageNamesstruts.excludedPackageNames
additionalExcludedPatternsstruts.additional.excludedPatterns
additionalAcceptedPatternsstruts.additional.acceptedPatterns
overrideExcludedPatternsstruts.override.excludedPatterns
overrideAcceptedPatternsstruts.override.acceptedPatterns
struts.xwork.chaining.copyErrorsstruts.chaining.copyErrors
struts.xwork.chaining.copyFieldErrorsstruts.chaining.copyFieldErrors
struts.xwork.chaining.copyMessagesstruts.chaining.copyMessages
xwork.autoGrowCollectionLimitstruts.ognl.autoGrowthCollectionLimit
objectFactory.classloaderstruts.objectFactory.classloader
logMissingPropertiesstruts.ognl.logMissingProperties

New constants

Constant nameDescription
struts.i18n.search.defaultbundles.firstAllows search in default bundles first, read more in the docs

Tag escape behaviour

After migrating to the latest Freemarker (which enables auto-escaping by default) you should top stop using ?html in your custom tags and freemarker based pages. Also when embedding one a tag in another <s:a>  or <s:input> tags like in the example below:

Code Block
<s:a href="%{...}">
  <img src="<s:url value='/images/icon_waste_sml.png'/>"/>
</s:a>

The the inner tag will can be automatically escaped , to avoid such behaviour (if needed), set "escapeHtmlBody" attribute to "falsetrue" as below:

Code Block
<s:a href="%{...}" escapeHtmlBody="falsetrue">
  <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 falg. It's related to

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyWW-5022
and
Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyWW-4972
.

...