You are currently reviewing an older revision of this page.

DRAFT INT-XXXX How to update legacy customizations

Purpose

The Struts library and its dependencies have been upgraded in Appian 18.1. This guide is intended to provide a set of instructions that users can follow to update existing legacy customizations.

The library version changes are as follows:

  • Struts: 1.1 to 1.3.10-20.fc27 (provided by Fedora)
  • Taglibs: 1.0.6 to 1.2.3
  • Commons-chain: 1.1 to 1.2
  • Commons-beanutils: 1.8.0 to 1.9.3
  • Commons-digester: 1.5 to 1.8
  • Oro: 2.0.6 to 2.0.8

This legacy library upgrade affects customer customizations in the following types of files:

  • Struts configuration files (struts-config-*.xml)
  • Tag Library Descriptors (*.tld)
  • Java Server Pages (*.jsp)
  • Struts Actions (*.java).
  • web.xml

Instructions

Core Struts JARs

If your customizations require copying Core Struts JARs to other folders (an uncommon scenario), please note that Struts now consists of multiple jars, including core, el, tiles, taglib, and extras.

Web.xml Changes

If you are using a custom web.xml file that overwrites the web.xml provided by Appian (an uncommon scenario), you will need to make the following changes.

  1. Find the Struts Action Servlet in the web.xml file. For example, look for:

    <servlet-name>action</servlet-name>
    <servlet-class>com.appiancorp.common.struts.AppianActionServlet</servlet-class>
  2. Make the same changes as found in the Appian-provided web.xml. Note: if you have a github branch that you merge with Appian to get Appian's changes, this step will happen when you merge the branches.
    1. Remove the debug parameter from the action servlet. It looks like this:
      <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
      </init-param>
    2. Remove the application parameter from the action servlet. It looks like this: <init-param> <param-name>application</param-name> <param-value>resources.application</param-value></init-param>
    3. Add the following chainConfig parameter to the action servlet:
      <init-param>
      <param-name>chainConfig</param-name>
      <param-value>org/apache/struts/tiles/chain-config.xml</param-value>
      </init-param>
  3. [Uncommon] Address any additional customizations you have made to the Struts Action Servlet. The following <init-param> entries are no longer supported and should be removed:
    • mapping
    • bufferSize. This is now supported by the <controller> element in the Framework Struts Configuration file.
    • content. This is now supported by the <controller> element in the Framework Struts Configuration file, under the name contentType.
    • locale. This is now supported by the <controller> element in the Framework Struts Configuration file.
    • maxFileSize. This is now supported by the <controller> element in the Framework Struts Configuration file.
    • nocache. This is now supported by the <controller> element in the Framework Struts Configuration file.
    • multipartClass. This is now supported by the <controller> element in the Framework Struts Configuration file.
    • tempDir. This is now supported by the <controller> element in the Framework Struts Configuration file.
    • factory. This is now supported by the <message-resources> element in Struts Configuration files.
    • null. This is now supported by the <message-resources> element in Struts Configuration files.

      If you need to preserve the same functionality that these unsupported parameters were providing, they must be added to the appropriate Struts Configuration Files. Example:
      You find this parameter inside your action servlet:
      <init-param>
      <param-name>maxFileSize</param-name>
      <param-value>1G</param-value>
      </init-param>
      You would remove this parameter, and then add an equivalent set-property element the inside the <controller> element in your customized version of struts-config-framework.xml, like so:
      <controller>
      ...
      <set-property property="maxFileSize" value="1G" />
      </controller>