You can create and extend a struts XML file in the web UI framework.
Procedure
- Create your app_extn_struts.xml file to extend the app_struts.xml file which contains all
of your actions.
- Navigate to the <INSTALL_DIR>/repository/eardata/<application
name>/extn directory and re-name the struts.properties.sample and struts.xml.sample files to
struts.properties and struts.xml respectively.
The following shows struts.properties sample contents:
struts.action.extension=do
struts.devMode=true
The following shows struts.xml sample contents:
<struts>
<include file="struts-default.xml"/>
<include file="scuiimpl_struts.xml"/>
<include file="app_struts.xml"/>
<include file="app_extn_struts.xml"/> <!--your extn struts must be included after the app_struts.xml -->
</struts>
- Include the app_extn_struts.xml file in the classpath. This can be done by one of the
following ways:
- Create a WEB-INF/lib directory in the extn directory and copy your JAR file containing the
app_extn_struts.xml file there. This step can be followed in case of single and
multiwar deployments.
- Create a WEB-INF/classes directory in the extn directory and copy your app_extn_struts.xml file
there. This step can be followed in case of single and multiwar deployments.
- Create a JAR file containing the app_extn_struts.xml file and run the Install3rdParty.sh script.
This step can only be followed in case of a single war deployment.
- Run the buildear or buildwar utility to create the EAR/WAR file.
What to do next
Note: When you override struts that use custom strut classes, see the appropriate Javadoc
information for other details about your implementation.