01 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
02 <%@ taglib uri="netui-tags-html.tld" prefix="netui" %>
03
04
05 <html>
06 <head>
07 <netui:base/>
08 <title>Merging Struts Functionality with Page Flow</title>
09 <link href="../../resources/css/style.css" type="text/css" rel="stylesheet"/>
10 </head>
11
12 <body bgcolor=white style="margin:0">
13
14 <jsp:include page="/resources/jsp/header.jsp"/>
15
16 <blockquote>
17
18 <h3>Merging Struts Functionality with Page Flow</h3>
19
20 <p>This sample shows how functionality from an "all Struts"
21 application's configuration XML file can be merged with
22 a page flow application. The /strutsMerge/strutsMergeController.jpf
23 file contains a @jpf:controller annotation that uses a struts-merge
24 attribute. The attribute references the all-struts-config-merge-example.xml
25 file that is in this web project's /WEB-INF directory (required location).</p>
26
27 <p>To demonstrate this Struts Merge feature, the deliberately undefined "foo.do" action
28 that is referenced on this JSP page will use an action method in the strutsMergeController.jpf page flow named
29 "unk". This action method is the "unknown" handler. It forwards to a global forward
30 ("fromStrutsConfig") that is defined in the merged file; that is, after the WebApp
31 project was compiled, the Struts functionality from /WEB-INF/all-struts-config-merge-example.xml
32 was merged with the XML file generated for this page flow. The combined configuration file for this
33 /strutsMerge page flow is /WEB-INF/jpf-struts-config-strutsMerge.xml. </p>
34
35 <hr width=50% size=1>
36
37 <p> </p>
38
39 <p>Okay, are you ready to try it? Click the link below, which raises the
40 unknown action "foo":
41
42 <p> </p>
43
44 <p><netui:anchor href="foo.do">This link raises an unknown action named
45 "foo"</netui:anchor></p>
46
47
48
49 <p> </p>
50
51 </blockquote>
52
53 </body>
54 </html>
|