Merge-jpf-struts-config.xml Sample

This topic inludes the source code for the Merge-jpf-struts-config.xml Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/struts/strutsInterop/

Sample Source Code


01 <?xml version="1.0" encoding="ISO-8859-1" ?>
02 <!DOCTYPE struts-config PUBLIC
03           "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
04           "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
05 
06 <struts-config>
07 
08     <!-- ========== Form Bean Definitions ================================== -->
09     <form-beans>
10     </form-beans>
11 
12     <!-- ========== Global Forward Definitions ============================= -->
13     <global-forwards>
14     </global-forwards>
15 
16     <!-- ========== Action Mapping Definitions ============================= -->
17 
18   <!--
19         Page flows by default scope form bean instances to the request.  But
20         because in this example we want to pass the form bean from the page
21         flow to the struts module: strutsModule we must scope the form bean to
22         the session.  We do this by using the "struts-merge" attribute on the
23         "@jpf:controller" annotation in the strutsInteropController.jpf source
24         file.  This attribute will cause the contents of this xml file to be
25         merged in with the generated jpf-struts-config-strutsInterop.xml file.
26         In the event of a conflict, *THIS* file always wins.
27     -->
28   
29     <action-mappings>
30         <action
31             path="/jpfAction1"
32             scope="session" >
33         </action>
34         <action
35             path="/jpfAction2"
36             scope="session" >
37         </action>
38         <action
39             path="/jpfAction3"
40             scope="session" >
41         </action>
42     </action-mappings>
43 
44 </struts-config>