ExceptionsController.jpf Sample

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

Sample Location

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

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui/exceptions/

Sample Source Code


01 package tagSamples.netui.exceptions;
02 import com.bea.wlw.netui.pageflow.Forward;
03 import com.bea.wlw.netui.pageflow.PageFlowController;
04 
05 /**
06  * Users who are not logged in to WebLogic Server will be diverted to the error.jsp page
07  * where the netui:exception tag displays the exception that has been thrown and the stack trace.
08  
09  * @jpf:controller login-required="true"
10  * @jpf:view-properties view-properties::
11  <!-- This data is auto-generated. Hand-editing this section is not recommended. -->
12  <view-properties>
13  <pageflow-object id="pageflow:/tagSamples/netui/exceptions/ExceptionsController.jpf"/>
14  <pageflow-object id="action:begin.do">
15  *   <property value="80" name="x"/>
16  *   <property value="100" name="y"/>
17  </pageflow-object>
18  <pageflow-object id="page:index.jsp">
19  *   <property value="240" name="x"/>
20  *   <property value="100" name="y"/>
21  </pageflow-object>
22  <pageflow-object id="page:error.jsp">
23  *   <property value="380" name="x"/>
24  *   <property value="100" name="y"/>
25  </pageflow-object>
26  <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@">
27  *   <property value="116,160,160,204" name="elbowsX"/>
28  *   <property value="92,92,92,92" name="elbowsY"/>
29  *   <property value="East_1" name="fromPort"/>
30  *   <property value="West_1" name="toPort"/>
31  *   <property value="success" name="label"/>
32  </pageflow-object>
33  </view-properties>
34  * ::
35  * @jpf:catch message="You must be logged in to enter this Controller file." path="error.jsp" type="com.bea.wlw.netui.pageflow.NotLoggedInException"
36  */
37 public class ExceptionsController extends PageFlowController
38 {
39     /**
40      * @jpf:action
41      * @jpf:forward name="success" path="index.jsp"
42      */
43     protected Forward begin()
44     {
45         return new Forward("success");
46     }
47 }