# Controller.jpf Sample

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

## Sample Location

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

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

## Sample Source Code

`001 import com.bea.wlw.netui.pageflow.PageFlowController; 002 import com.bea.wlw.netui.pageflow.Forward; 003 004 /** 005 * @jpf:view-properties view-properties:: 006 * <!-- This data is auto-generated. Hand-editing this section is not recommended. --> 007 * <view-properties> 008 * <pageflow-object id="pageflow:/Controller.jpf"/> 009 * <pageflow-object id="action:begin.do"> 010 * <property name="x" value="40"/> 011 * <property name="y" value="180"/> 012 * </pageflow-object> 013 * <pageflow-object id="action:toHandlingData.do"> 014 * <property value="280" name="x"/> 015 * <property value="240" name="y"/> 016 * </pageflow-object> 017 * <pageflow-object id="action:toNavigation.do"> 018 * <property value="280" name="x"/> 019 * <property value="400" name="y"/> 020 * </pageflow-object> 021 * <pageflow-object id="action:toSecurity.do"> 022 * <property value="280" name="x"/> 023 * <property value="480" name="y"/> 024 * </pageflow-object> 025 * <pageflow-object id="action:toStruts.do"> 026 * <property value="280" name="x"/> 027 * <property value="160" name="y"/> 028 * </pageflow-object> 029 * <pageflow-object id="action:toTagSamples.do"> 030 * <property name="x" value="280"/> 031 * <property name="y" value="320"/> 032 * </pageflow-object> 033 * <pageflow-object id="action:toControls.do"> 034 * <property value="280" name="x"/> 035 * <property value="560" name="y"/> 036 * </pageflow-object> 037 * <pageflow-object id="action-call:@page:index.jsp@#@action:toHandlingData.do@"> 038 * <property value="176,210,210,244" name="elbowsX"/> 039 * <property value="172,172,232,232" 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:toControls.do@"> 044 * <property value="176,210,210,244" name="elbowsX"/> 045 * <property value="172,172,552,552" 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:toSecurity.do@"> 050 * <property value="176,210,210,244" name="elbowsX"/> 051 * <property value="172,172,472,472" name="elbowsY"/> 052 * <property value="East_1" name="fromPort"/> 053 * <property value="West_1" name="toPort"/> 054 * </pageflow-object> 055 * <pageflow-object id="action-call:@page:index.jsp@#@action:toTagSamples.do@"> 056 * <property value="176,210,210,244" name="elbowsX"/> 057 * <property value="172,172,312,312" name="elbowsY"/> 058 * <property value="East_1" name="fromPort"/> 059 * <property value="West_1" name="toPort"/> 060 * </pageflow-object> 061 * <pageflow-object id="action-call:@page:index.jsp@#@action:toNavigation.do@"> 062 * <property value="176,210,210,244" name="elbowsX"/> 063 * <property value="172,172,392,392" name="elbowsY"/> 064 * <property value="East_1" name="fromPort"/> 065 * <property value="West_1" name="toPort"/> 066 * </pageflow-object> 067 * <pageflow-object id="action-call:@page:index.jsp@#@action:toStruts.do@"> 068 * <property value="176,210,210,244" name="elbowsX"/> 069 * <property value="172,172,152,152" name="elbowsY"/> 070 * <property value="East_1" name="fromPort"/> 071 * <property value="West_1" name="toPort"/> 072 * </pageflow-object> 073 * <pageflow-object id="page:index.jsp"> 074 * <property name="x" value="140"/> 075 * <property name="y" value="180"/> 076 * </pageflow-object> 077 * <pageflow-object id="external-jpf:handlingData/handlingDataController.jpf"> 078 * <property name="x" value="520"/> 079 * <property name="y" value="240"/> 080 * </pageflow-object> 081 * <pageflow-object id="external-jpf:navigation/navigationController.jpf"> 082 * <property name="x" value="520"/> 083 * <property name="y" value="400"/> 084 * </pageflow-object> 085 * <pageflow-object id="external-jpf:security/securityController.jpf"> 086 * <property value="520" name="x"/> 087 * <property value="480" name="y"/> 088 * </pageflow-object> 089 * <pageflow-object id="external-jpf:struts/strutsController.jpf"> 090 * <property name="x" value="520"/> 091 * <property name="y" value="160"/> 092 * </pageflow-object> 093 * <pageflow-object id="external-jpf:tagSamples/tagSamplesController.jpf"> 094 * <property name="x" value="520"/> 095 * <property name="y" value="320"/> 096 * </pageflow-object> 097 * <pageflow-object id="external-jpf:controls/controlsController.jpf"> 098 * <property value="520" name="x"/> 099 * <property value="560" name="y"/> 100 * </pageflow-object> 101 * <pageflow-object id="page:error.jsp"> 102 * <property name="x" value="360"/> 103 * <property name="y" value="100"/> 104 * </pageflow-object> 105 * <pageflow-object id="forward:path#index#index.jsp#@action:begin.do@"> 106 * <property name="elbowsY" value="172,172,172,172"/> 107 * <property name="elbowsX" value="76,90,90,104"/> 108 * <property name="toPort" value="West_1"/> 109 * <property name="fromPort" value="East_1"/> 110 * <property name="label" value="index"/> 111 * </pageflow-object> 112 * <pageflow-object id="forward:path#success#handlingData/handlingDataController.jpf#@action:toHandlingData.do@"> 113 * <property name="elbowsY" value="232,232,232,232"/> 114 * <property name="elbowsX" value="316,400,400,484"/> 115 * <property name="toPort" value="West_1"/> 116 * <property name="fromPort" value="East_1"/> 117 * <property name="label" value="success"/> 118 * </pageflow-object> 119 * <pageflow-object id="forward:path#success#navigation/navigationController.jpf#@action:toNavigation.do@"> 120 * <property value="316,400,400,484" name="elbowsX"/> 121 * <property value="392,392,392,392" name="elbowsY"/> 122 * <property value="East_1" name="fromPort"/> 123 * <property value="West_1" name="toPort"/> 124 * <property value="success" name="label"/> 125 * </pageflow-object> 126 * <pageflow-object id="forward:path#success#security/securityController.jpf#@action:toSecurity.do@"> 127 * <property value="316,400,400,484" name="elbowsX"/> 128 * <property value="472,472,472,472" name="elbowsY"/> 129 * <property value="East_1" name="fromPort"/> 130 * <property value="West_1" name="toPort"/> 131 * <property value="success" name="label"/> 132 * </pageflow-object> 133 * <pageflow-object id="forward:path#success#struts/strutsController.jpf#@action:toStruts.do@"> 134 * <property value="316,400,400,484" name="elbowsX"/> 135 * <property value="152,152,152,152" name="elbowsY"/> 136 * <property value="East_1" name="fromPort"/> 137 * <property value="West_1" name="toPort"/> 138 * <property value="success" name="label"/> 139 * </pageflow-object> 140 * <pageflow-object id="forward:path#success#tagSamples/tagSamplesController.jpf#@action:toTagSamples.do@"> 141 * <property name="elbowsY" value="312,312,312,312"/> 142 * <property name="elbowsX" value="316,400,400,484"/> 143 * <property name="toPort" value="West_1"/> 144 * <property name="fromPort" value="East_1"/> 145 * <property name="label" value="success"/> 146 * </pageflow-object> 147 * <pageflow-object id="forward:path#success#controls/controlsController.jpf#@action:toControls.do@"> 148 * <property value="316,400,400,484" name="elbowsX"/> 149 * <property value="552,552,552,552" name="elbowsY"/> 150 * <property value="East_1" name="fromPort"/> 151 * <property value="West_1" name="toPort"/> 152 * <property value="success" name="label"/> 153 * </pageflow-object> 154 * <pageflow-object id="external-jpf:/security/roleBasedSecurity/roleBasedSecurityController.jpf"> 155 * <property value="520" name="x"/> 156 * <property value="2140" name="y"/> 157 * </pageflow-object> 158 * </view-properties> 159 * :: 160 * 161 */ 162 public class Controller extends PageFlowController 163 { 164 /** 165 * @jpf:action 166 * @jpf:forward name="index" path="index.jsp" redirect="true" 167 */ 168 protected Forward begin() 169 { 170 return new Forward("index"); 171 } 172 173 174 /** 175 * @jpf:action 176 * @jpf:forward name="success" path="handlingData/handlingDataController.jpf" 177 */ 178 protected Forward toHandlingData() 179 { 180 return new Forward("success"); 181 } 182 183 184 /** 185 * @jpf:action 186 * @jpf:forward name="success" path="navigation/navigationController.jpf" 187 */ 188 protected Forward toNavigation() 189 { 190 return new Forward("success"); 191 } 192 193 /** 194 * @jpf:action 195 * @jpf:forward name="success" path="security/securityController.jpf" 196 */ 197 protected Forward toSecurity() 198 { 199 return new Forward("success"); 200 } 201 202 /** 203 * @jpf:action 204 * @jpf:forward name="success" path="struts/strutsController.jpf" 205 */ 206 protected Forward toStruts() 207 { 208 return new Forward("success"); 209 } 210 211 212 /** 213 * @jpf:action 214 * @jpf:forward name="success" path="tagSamples/tagSamplesController.jpf" 215 */ 216 protected Forward toTagSamples() 217 { 218 return new Forward("success"); 219 } 220 221 222 /** 223 * @jpf:action 224 * @jpf:forward name="success" path="controls/controlsController.jpf" 225 */ 226 protected Forward toControls() 227 { 228 return new Forward("success"); 229 } 230 }`