generated from moderneinc/rewrite-recipe-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
What problem are you trying to solve?
Recipe to migrate to Struts 6.x
- Upgrade to Java 8
- Servlet API 3.1
- Update Struts dependencies to 6.x.x.
- Remove sitegraph plugin
- Add Velocity plugin if needed
- Use a proper DTD header in struts.xml
- Class changes
-
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider
became abstract,
useorg.apache.struts2.config.StrutsXmlConfigurationProvider
instead -
com.opensymphony.xwork2.conversion.TypeConversionException
was replaced byorg.apache.struts2.conversion.TypeConversionException
-
com.opensymphony.xwork2.XWorkException
was replaced byorg.apache.struts2.StrutsException
-
- XWork constants; see list of removed constants and Struts substitutes
- New constants
struts.i18n.search.defaultbundles.first
andstruts.ui.escapeHtmlBody
- Tag escape behaviour
- 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:
- The <s:date/> tag has been adjusted to support a new Java 8 Date/Time API
- Deprecated interfaces
- These interfaces have a new proper versions in another package, please start using the new versions as the deprecated interfaces will be removed with the next major release
- Javatemplate Checkbox tag
- can introduce a NullPointerException when you will use Boolean or String to hold an unchecked value as submittedUnchecked is set to false by default, which means the unchecked value won't be sent and stored in the action
- Static methods access
- It won't be possible to access static methods using OGNL expression, eg. @com.app.Util@makeCode() won't work anymore. If you are still using this approach you must wrap access to static methods with action instance methods or use static field access instead.
Any additional context
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Recipes Wanted