Migrating Struts Web Pages
HATS users migrating or updating Struts Web Pages to HATS 9.7.0.2, should follow the below steps:
- Navigate to 'plugins’ folder under IMShared location in your computer and then navigate to the ‘lib’ folder under ‘com.ibm.hsrendering’ location in your computer and then navigate to the C:\Program Files\ibm\IBMIMShared\plugins\com.ibm.hsrendering_9.7.xxxxxxxxxxx\lib
- Copy the commons-beanutils-1.9.4.jar, commons-collections-3.2.2.jar, commons-digester-2.1.jar, commons-fileupload-1.4.jar, commons-io-2.7.jar, commons-lang3-3.8.1.jar, commons-logging-1.2.jar, freemarker-2.3.30.jar, javassist-3.20.0-GA.jar, log4j-api-2.12.1.jar, ognl-3.1.28.jar and struts2-core-2.5.26.jar from the path navigated in Step 1.
- Within Migrated HATS Web Project, paste the JARs copied in Step b) at the project location 'WebContent/ WEB-INF/ lib’ .
- StrutsPrepareAndExecuteFilter:
The org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter was moved to org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter .
.In web.xml replace this:
<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter>with
<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter> - DTD:
Struts DTD was updated to 2.5 version.
.In struts.xml replace 2.3 DTD version:
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd" >with
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.5.dtd" >