Migrating Struts Web Pages

HATS users migrating/updating Struts Web Pages to HATS version 9.6.1.2 (and later), should follow the below steps to use the Struts 2.5.26 release JARs:

  1. Navigate to ‘plugins’ folder under IMShared location in your computer and then navigate to the ‘lib’ folder under the ‘com.ibm.hsrendering’ plugin folder. For example, ‘C:\Program Files\ibm\IBMIMShared\plugins\com.ibm.hsrendering_9.6.XXX.XXXXXXXXXXXX\lib.
  2. Copy the commons-beanutils-1.9.4.jar, commons-collections-3.2.2.jar, commons-fileupload-1.4.jar, commons-io-2.6.jar, commons-lang3-3.8.1.jar, freemarker-2.3.30.jar, javassist-3.20.0-GA.jar, ognl-3.1.28.jar, struts2-core-2.5.26.jar and log4j-api-2.12.1.jar from the path navigated in Step 1).
  3. Within Migrated HATS Web Project, paste the JARs copied in Step 2) at the project location ‘WebContent/ WEB-INF/ lib’.
  4. StrutsPrepareAndExecuteFilter: The org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter was moved to org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter. In the web.xml file, replace the below code:
    
    	<filter>	
    		<filter-name>struts2</filter-name>
    		<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    	</filter>	
    
    with the following code:
    
    	<filter>
    	    <filter-name>struts2</filter-name>
    	    <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
    	</filter>
    
  5. DTD: Struts DTD was updated to 2.5 version. In the struts.xml file, replace the 2.3 DTD version in the code below:
    
    		<!DOCTYPE struts PUBLIC
            "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
            "http://struts.apache.org/dtds/struts-2.3.dtd">
    
    with the 2.5 DTD version as shown below :
    
    		<!DOCTYPE struts PUBLIC
            "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
            "http://struts.apache.org/dtds/struts-2.5.dtd">