-
Notifications
You must be signed in to change notification settings - Fork 3
/
webwork2.html
180 lines (152 loc) · 6.23 KB
/
webwork2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>PicoContainer Web - WebWork2</title>
<style type="text/css" media="all">
@import url("./style/pico.css");
@import url("./style/syntaxhighlighter.css");
</style>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2268879-1";
urchinTracker();
</script>
<script type="text/javascript" src="./js/prototype.js">
//
</script>
<meta name="verify-v1" content="UsIBiaQhhmjFrBwcJ2n4XIvEImPNG4SMVP365rRcpxE=" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body class="composite">
<div id="banner"><span> <img src="images/picocontainer-web-logo.png" alt="PicoContainer" /> <span
style="font-size: 72px; font-family: Geneva; font-weight: bold;"> <span style="color: rgb(58, 150, 27);">Pico</span><span
style="color: rgb(131, 131, 131);">Container</span> <span style="color: rgb(58, 150, 27);"> Web</span> </span> </span>
<div class="clear"></div>
</div>
<div id="breadcrumbs">
<div class="left">Latest Released Version: 2.3</div>
<div class="clear"></div>
</div>
<div id="leftColumn">
<div id="navColumn">
<h3><a href="http://picocontainer.org"><img src="images/pico-logo.png" hspace="10" align="left" /> <span
style="font-size: 18px; font-family: Geneva; font-weight: bold;"> <span style="color: rgb(131, 131, 131);">Built
on</span><br />
<span style="color: rgb(58, 150, 27);">Pico</span><br />
<span style="color: rgb(131, 131, 131);">Container</span></span></a></h3>
<h1>PicoContainer Web</h1>
<ul>
<li><a href="index.html">Overview</a></li>
<li><a href="news.html">News</a></li>
<li><a href="composition.html">Composition</a></li>
<li><a href="scoping.html">Scoping Web Components</a></li>
<li><a href="script-composition.html">Composition by Script</a></li>
<li><a href="javadoc.html">Javadocs</a></li>
<li><a href="downloads.html">Downloads</a></li>
</ul>
<h1>Binding to Web Frameworks</h1>
<ul>
<li><a href="jsf.html">JSF</a></li>
<li><a href="struts2.html">Struts2</a></li>
<li><a href="struts1.html">Struts1</a></li>
<li class="currentLink">WebWork2</li>
<li><a href="webwork1.html">WebWork1</a></li>
</ul>
<h1>Binding to other technologies</h1>
<ul>
<li><a href="remoting.html">Pico Web Remoting</a></li>
<li><a href="axis.html">Axis</a></li>
</ul>
<h1>Hosted by</h1>
<img alt="Hosted at Codehaus" src="images/codehaus-small.gif" width="120" height="40" /><br />
<h1>Tools</h1>
<img alt="Maven" src="images/maven-feather.png" /> <br />
<img alt="Eclipse" src="images/eclipse-logo-white.jpg" width="100" height="40" /> <br />
<img alt="IDEA" src="images/idea88x31_white.gif" /> <br />
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>WebWork2</h2>
<p>To configure PicoContainer to handle the dependency injection of WebWork2 actions, refer to the
web.xml below. For a start there is a slightly different listener to the one defined in the <a href="index.html">main
page</a>. Also, instead of using WebWork2's servlet, use ours. Everything else from the standard WebWork2 setup is
appropriate.</p>
<div class="source"><pre>
<web-app>
<display-name>PicoContainer-Web WebWork 2 Demo</display-name>
<context-param>
<param-name>webapp-composer-class</param-name>
<param-value>*your web app composer class name*</param-value>
</context-param>
<filter>
<filter-name>picoFilter</filter-name>
<filter-class>org.picocontainer.web.webwork2.PicoObjectFactory$ServletFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>picoFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.picocontainer.web.webwork2.WebWork2PicoServletContainerListener</listener-class>
</listener>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>com.opensymphony.webwork.dispatcher.ServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>webwork</taglib-uri>
<taglib-location>/WEB-INF/webwork.tld</taglib-location>
</taglib>
</web-app>
</pre></div>
<p>The Maven example project is <a
href="http://svn.codehaus.org/picocontainer/java/2.x/trunk/web/examples/webwork2-webapp/">here</a>. Make sure you make
and configure your own <a href="composition.html">WebappComposer</a> implementation.</p>
<p>See <a href="downloads.html">downloads</a> on how to download the webwork2 module either using Maven or by
downloading full distribution.</p>
<p>We have a sample application. It is a small form-style web-app that shows and list of cheeses, allows you to add and delete from the list. <a href="http://svn.codehaus.org/picocontainer/java/2.x/trunk/web/examples/webwork2-webapp/">See the Maven2 source for it</a>. Here is a screenshot of it running:</p>
<img src="images/WebWork2_App.jpg"/>
<p><a href="http://picocontainer/web/warfiles/pico-webwork2-demo.war">Download the war file for it</a> (full Java source in WEB-INF/classes).</p>
</div>
</div>
</div>
<div class="clear"></div>
<div id="footer">
<div class="right">© 2003-2008 PicoContainer Committers</div>
<div class="clear"></div>
</div>
</body>
<!-- Scripts to highlight code: MUST be left AFTER the body -->
<script language="javascript" src="./js/shCore.js">
//
</script>
<script language="javascript" src="./js/shBrushJava.js">
//
</script>
<script language="javascript" src="./js/shBrushXml.js">
//
</script>
<script type="text/javascript">
// <![CDATA[
var elements = document.getElementsByClassName('source');
elements.each( function(element) {
var content = element.getElementsByTagName('pre')[0].innerHTML;
var classType = /^</.test(content) ? "xml" : "java";
content = "<textarea name=\"code\" class=\"" + classType + "\">"
+ content + "</textarea>";
new Insertion.Before(element, content);
element.remove(element);
});
dp.SyntaxHighlighter.HighlightAll('code', false, false);
// ]]>
</script>
</html>