# StrutsController.jpf Sample

This topic inludes the source code for the StrutsController.jpf Sample.

## Sample Location

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

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

## Sample Source Code

`001 package struts; 002 import com.bea.wlw.netui.pageflow.Forward; 003 import com.bea.wlw.netui.pageflow.PageFlowController; 004 005 /** 006 * @jpf:controller 007 * @jpf:view-properties view-properties:: 008 * <!-- This data is auto-generated. Hand-editing this section is not recommended. --> 009 * <view-properties> 010 * <pageflow-object id="pageflow:/struts/strutsController.jpf"/> 011 * <pageflow-object id="action:begin.do"> 012 * <property value="80" name="x"/> 013 * <property value="100" name="y"/> 014 * </pageflow-object> 015 * <pageflow-object id="action:toValidation.do"> 016 * <property value="380" name="x"/> 017 * <property value="40" name="y"/> 018 * </pageflow-object> 019 * <pageflow-object id="action:toStrutsMerge.do"> 020 * <property value="380" name="x"/> 021 * <property value="100" name="y"/> 022 * </pageflow-object> 023 * <pageflow-object id="action:toStrutsInterop.do"> 024 * <property value="380" name="x"/> 025 * <property value="180" name="y"/> 026 * </pageflow-object> 027 * <pageflow-object id="action:toPageFlowSamples.do"> 028 * <property value="380" name="x"/> 029 * <property value="260" name="y"/> 030 * </pageflow-object> 031 * <pageflow-object id="action-call:@page:index.jsp@#@action:toPageFlowSamples.do@"> 032 * <property value="276,310,310,344" name="elbowsX"/> 033 * <property value="92,92,252,252" name="elbowsY"/> 034 * <property value="East_1" name="fromPort"/> 035 * <property value="West_1" name="toPort"/> 036 * </pageflow-object> 037 * <pageflow-object id="action-call:@page:index.jsp@#@action:toStrutsInterop.do@"> 038 * <property value="276,310,310,344" name="elbowsX"/> 039 * <property value="92,92,172,172" name="elbowsY"/> 040 * <property value="East_1" name="fromPort"/> 041 * <property value="West_1" name="toPort"/> 042 * </pageflow-object> 043 * <pageflow-object id="action-call:@page:index.jsp@#@action:toStrutsMerge.do@"> 044 * <property value="276,310,310,344" name="elbowsX"/> 045 * <property value="92,92,92,92" name="elbowsY"/> 046 * <property value="East_1" name="fromPort"/> 047 * <property value="West_1" name="toPort"/> 048 * </pageflow-object> 049 * <pageflow-object id="action-call:@page:index.jsp@#@action:toValidation.do@"> 050 * <property value="276,310,310,344" name="elbowsX"/> 051 * <property value="92,92,32,32" name="elbowsY"/> 052 * <property value="East_1" name="fromPort"/> 053 * <property value="West_1" name="toPort"/> 054 * </pageflow-object> 055 * <pageflow-object id="page:index.jsp"> 056 * <property value="240" name="x"/> 057 * <property value="100" name="y"/> 058 * </pageflow-object> 059 * <pageflow-object id="external-jpf:validation/Controller.jpf"> 060 * <property value="500" name="x"/> 061 * <property value="40" name="y"/> 062 * </pageflow-object> 063 * <pageflow-object id="external-jpf:strutsMerge/strutsMergeController.jpf"> 064 * <property value="500" name="x"/> 065 * <property value="100" name="y"/> 066 * </pageflow-object> 067 * <pageflow-object id="external-jpf:strutsInterop/strutsInteropController.jpf"> 068 * <property value="500" name="x"/> 069 * <property value="180" name="y"/> 070 * </pageflow-object> 071 * <pageflow-object id="external-jpf:/Controller.jpf"> 072 * <property value="500" name="x"/> 073 * <property value="260" name="y"/> 074 * </pageflow-object> 075 * <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@"> 076 * <property value="116,160,160,204" name="elbowsX"/> 077 * <property value="92,92,92,92" name="elbowsY"/> 078 * <property value="East_1" name="fromPort"/> 079 * <property value="West_1" name="toPort"/> 080 * <property value="success" name="label"/> 081 * </pageflow-object> 082 * <pageflow-object id="forward:path#success#validation/Controller.jpf#@action:toValidation.do@"> 083 * <property value="416,440,440,464" name="elbowsX"/> 084 * <property value="32,32,32,32" name="elbowsY"/> 085 * <property value="East_1" name="fromPort"/> 086 * <property value="West_1" name="toPort"/> 087 * <property value="success" name="label"/> 088 * </pageflow-object> 089 * <pageflow-object id="forward:path#success#strutsMerge/strutsMergeController.jpf#@action:toStrutsMerge.do@"> 090 * <property value="416,440,440,464" name="elbowsX"/> 091 * <property value="92,92,92,92" name="elbowsY"/> 092 * <property value="East_1" name="fromPort"/> 093 * <property value="West_1" name="toPort"/> 094 * <property value="success" name="label"/> 095 * </pageflow-object> 096 * <pageflow-object id="forward:path#success#strutsInterop/strutsInteropController.jpf#@action:toStrutsInterop.do@"> 097 * <property value="416,440,440,464" name="elbowsX"/> 098 * <property value="172,172,172,172" name="elbowsY"/> 099 * <property value="East_1" name="fromPort"/> 100 * <property value="West_1" name="toPort"/> 101 * <property value="success" name="label"/> 102 * </pageflow-object> 103 * <pageflow-object id="forward:path#success#/Controller.jpf#@action:toPageFlowSamples.do@"> 104 * <property value="416,440,440,464" name="elbowsX"/> 105 * <property value="252,252,252,252" name="elbowsY"/> 106 * <property value="East_1" name="fromPort"/> 107 * <property value="West_1" name="toPort"/> 108 * <property value="success" name="label"/> 109 * </pageflow-object> 110 * </view-properties> 111 * :: 112 */ 113 public class strutsController extends PageFlowController 114 { 115 116 /** 117 * @jpf:action 118 * @jpf:forward name="success" path="index.jsp" 119 */ 120 protected Forward begin() 121 { 122 return new Forward("success"); 123 } 124 125 /** 126 * @jpf:action 127 * @jpf:forward path="validation/Controller.jpf" name="success" 128 */ 129 protected Forward toValidation() 130 { 131 return new Forward("success"); 132 } 133 134 /** 135 * @jpf:action 136 * @jpf:forward path="strutsMerge/strutsMergeController.jpf" name="success" 137 */ 138 protected Forward toStrutsMerge() 139 { 140 return new Forward("success"); 141 } 142 143 /** 144 * @jpf:action 145 * @jpf:forward path="strutsInterop/strutsInteropController.jpf" name="success" 146 */ 147 protected Forward toStrutsInterop() 148 { 149 return new Forward("success"); 150 } 151 152 /** 153 * @jpf:action 154 * @jpf:forward path="/Controller.jpf" name="success" 155 */ 156 protected Forward toPageFlowSamples() 157 { 158 return new Forward("success"); 159 } 160 }`