You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2013/07/17 11:31:13 UTC
svn commit: r869821 [3/43] - in
/websites/production/struts/content/development/2.x/docs: ./
ajax-validation.data/ big-picture.data/ chaining-interceptor.data/
colophon.data/ config-browser-plugin.data/
create-struts-2-web-application-using-maven-to-ma...
Added: websites/production/struts/content/development/2.x/docs/application-session-request-objects-in-vm.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/application-session-request-objects-in-vm.html (added)
+++ websites/production/struts/content/development/2.x/docs/application-session-request-objects-in-vm.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,214 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html>
+<head>
+ <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+ <style type="text/css">
+ .dp-highlighter {
+ width:95% !important;
+ }
+ </style>
+ <style type="text/css">
+ .footer {
+ background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+ background-repeat: repeat-x;
+ background-position: left top;
+ padding-top: 4px;
+ color: #666;
+ }
+ </style>
+ <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+ <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+ <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+ <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+
+ <script type="text/javascript">
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
+ <script type="text/javascript" language="javascript">
+ var hide = null;
+ var show = null;
+ var children = null;
+
+ function init() {
+ /* Search form initialization */
+ var form = document.forms['search'];
+ if (form != null) {
+ form.elements['domains'].value = location.hostname;
+ form.elements['sitesearch'].value = location.hostname;
+ }
+
+ /* Children initialization */
+ hide = document.getElementById('hide');
+ show = document.getElementById('show');
+ children = document.all != null ?
+ document.all['children'] :
+ document.getElementById('children');
+ if (children != null) {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ }
+
+ function showChildren() {
+ children.style.display = 'block';
+ show.style.display = 'none';
+ hide.style.display = 'inline';
+ }
+
+ function hideChildren() {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ </script>
+ <title>Application, Session, Request objects in vm</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tr class="topBar">
+ <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+ <a href="home.html">Home</a> > <a href="faqs.html">FAQs</a> > <a href="cookbook.html">Cookbook</a> > <a href="application-session-request-objects-in-vm.html">Application, Session, Request objects in vm</a>
+ </td>
+ <td align="right" valign="middle" nowrap>
+ <form name="search" action="http://www.google.com/search" method="get">
+ <input type="hidden" name="ie" value="UTF-8" />
+ <input type="hidden" name="oe" value="UTF-8" />
+ <input type="hidden" name="domains" value="" />
+ <input type="hidden" name="sitesearch" value="" />
+ <input type="text" name="q" maxlength="255" value="" />
+ <input type="submit" name="btnG" value="Google Search" />
+ </form>
+ </td>
+ </tr>
+</table>
+
+<div id="PageContent">
+ <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+ <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+ <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+ <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+ <div style="margin: 0px 10px 8px 10px" class="pagetitle">Application, Session, Request objects in vm</div>
+
+ <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=13918">
+ <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=13918">Edit Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+ <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=13918">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=13918">Add Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=13918">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=13918">Add News</a>
+ </div>
+ </div>
+
+ <div class="pagecontent">
+ <div class="wiki-content">
+ <div id="ConfluenceContent">
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+$req.session.servletContext.getAttribute(...)
+$req.session.getAttribute(...)
+$req.getAttribute(...)
+]]></script>
+</div></div>
+
+
+<p>To get parameters from the QueryString or from a POSTed form, do not use getAttribute, use:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+$req.getParameter(...)
+]]></script>
+</div></div>
+
+<p>But that's quite obvious, since $req is the request object and we all know how it works.</p>
+
+<p><b>Example:</b></p>
+
+<p>_<em>test.jsp</em>_:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+<html><head></head><body>
+<%
+session.setAttribute("sessionFoo", "sessionBar");
+session.getServletContext().setAttribute("applicationFoo", "applicationBar");
+%>
+
+<p>The following information should be available when sending the form below:
+
+<ul>
+ <li>Request parameter 'querystringFoo' with value 'querystringBar';</li>
+ <li>Request parameter 'formFoo' with value 'formBar';</li>
+ <li>Session attribute 'sessionFoo' with value 'sessionBar';</li>
+ <li>Application attribute 'applicationFoo' with value 'applicationBar'.</li>
+</ul>
+</p>
+
+<form action="test.vm?querystringFoo=querystringBar" method="post">
+<input type="hidden" name="formFoo" value="formBar">
+<p><input type="submit" value="Test!"></p>
+</form>
+</body></html>
+]]></script>
+</div></div>
+
+<p>_<em>test.vm</em>_:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+<html><head></head><body>
+
+#set ($ses = $req.getSession())
+#set ($app = $ses.getServletContext())
+
+<p>applicationFoo = $!app.getAttribute("applicationFoo") <code>(app.getAttribute("applicationFoo"))</code></p>
+<p>sessionFoo = $!ses.getAttribute("sessionFoo") <code>(ses.getAttribute("sessionFoo"))</code></p>
+<p>formFoo = $!req.getParameter("formFoo") <code>(req.getParameter("formFoo"))</code></p>
+<p>querystringFoo = $!req.getParameter("querystringFoo") <code>(req.getParameter("queryStringFoo"))</code></p>
+
+</body></html>
+]]></script>
+</div></div></div>
+ </div>
+
+
+ </div>
+</div>
+<div class="footer">
+ Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file
Added: websites/production/struts/content/development/2.x/docs/architects-guide.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/architects-guide.html (added)
+++ websites/production/struts/content/development/2.x/docs/architects-guide.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,145 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html>
+<head>
+ <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+ <style type="text/css">
+ .dp-highlighter {
+ width:95% !important;
+ }
+ </style>
+ <style type="text/css">
+ .footer {
+ background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+ background-repeat: repeat-x;
+ background-position: left top;
+ padding-top: 4px;
+ color: #666;
+ }
+ </style>
+ <script type="text/javascript" language="javascript">
+ var hide = null;
+ var show = null;
+ var children = null;
+
+ function init() {
+ /* Search form initialization */
+ var form = document.forms['search'];
+ if (form != null) {
+ form.elements['domains'].value = location.hostname;
+ form.elements['sitesearch'].value = location.hostname;
+ }
+
+ /* Children initialization */
+ hide = document.getElementById('hide');
+ show = document.getElementById('show');
+ children = document.all != null ?
+ document.all['children'] :
+ document.getElementById('children');
+ if (children != null) {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ }
+
+ function showChildren() {
+ children.style.display = 'block';
+ show.style.display = 'none';
+ hide.style.display = 'inline';
+ }
+
+ function hideChildren() {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ </script>
+ <title>Architects Guide</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tr class="topBar">
+ <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+ <a href="home.html">Home</a> > <a href="guides.html">Guides</a> > <a href="architects-guide.html">Architects Guide</a>
+ </td>
+ <td align="right" valign="middle" nowrap>
+ <form name="search" action="http://www.google.com/search" method="get">
+ <input type="hidden" name="ie" value="UTF-8" />
+ <input type="hidden" name="oe" value="UTF-8" />
+ <input type="hidden" name="domains" value="" />
+ <input type="hidden" name="sitesearch" value="" />
+ <input type="text" name="q" maxlength="255" value="" />
+ <input type="submit" name="btnG" value="Google Search" />
+ </form>
+ </td>
+ </tr>
+</table>
+
+<div id="PageContent">
+ <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+ <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+ <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+ <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+ <div style="margin: 0px 10px 8px 10px" class="pagetitle">Architects Guide</div>
+
+ <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=45478">
+ <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=45478">Edit Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+ <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=45478">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=45478">Add Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=45478">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=45478">Add News</a>
+ </div>
+ </div>
+
+ <div class="pagecontent">
+ <div class="wiki-content">
+ <div id="ConfluenceContent">
+<ul><li><a shape="rect" href="big-picture.html" title="Big Picture">Big Picture</a>
+ <ul><li><a shape="rect" href="objectfactory.html" title="ObjectFactory">ObjectFactory</a></li><li><a shape="rect" href="actionmapper.html" title="ActionMapper">ActionMapper</a></li><li><a shape="rect" href="action-proxy-actionproxy-factory.html" title="Action Proxy & ActionProxy Factory">Action Proxy & ActionProxy Factory</a></li><li><a shape="rect" href="configuration-provider-configuration.html" title="Configuration Provider & Configuration">Configuration Provider & Configuration</a></li></ul>
+ </li></ul>
+
+
+
+<h2><a shape="rect" name="ArchitectsGuide-Next%3AMigrationGuide"></a>Next: <a shape="rect" href="migration-guide.html" title="Migration Guide">Migration Guide</a></h2></div>
+ </div>
+
+
+ </div>
+</div>
+<div class="footer">
+ Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file
Added: websites/production/struts/content/development/2.x/docs/basic-validation.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/basic-validation.html (added)
+++ websites/production/struts/content/development/2.x/docs/basic-validation.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,276 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html>
+<head>
+ <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+ <style type="text/css">
+ .dp-highlighter {
+ width:95% !important;
+ }
+ </style>
+ <style type="text/css">
+ .footer {
+ background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+ background-repeat: repeat-x;
+ background-position: left top;
+ padding-top: 4px;
+ color: #666;
+ }
+ </style>
+ <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+ <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+ <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+ <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+ <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
+
+ <script type="text/javascript">
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
+ <script type="text/javascript" language="javascript">
+ var hide = null;
+ var show = null;
+ var children = null;
+
+ function init() {
+ /* Search form initialization */
+ var form = document.forms['search'];
+ if (form != null) {
+ form.elements['domains'].value = location.hostname;
+ form.elements['sitesearch'].value = location.hostname;
+ }
+
+ /* Children initialization */
+ hide = document.getElementById('hide');
+ show = document.getElementById('show');
+ children = document.all != null ?
+ document.all['children'] :
+ document.getElementById('children');
+ if (children != null) {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ }
+
+ function showChildren() {
+ children.style.display = 'block';
+ show.style.display = 'none';
+ hide.style.display = 'inline';
+ }
+
+ function hideChildren() {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ </script>
+ <title>Basic Validation</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tr class="topBar">
+ <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+ <a href="home.html">Home</a> > <a href="guides.html">Guides</a> > <a href="core-developers-guide.html">Core Developers Guide</a> > <a href="validation.html">Validation</a> > <a href="basic-validation.html">Basic Validation</a>
+ </td>
+ <td align="right" valign="middle" nowrap>
+ <form name="search" action="http://www.google.com/search" method="get">
+ <input type="hidden" name="ie" value="UTF-8" />
+ <input type="hidden" name="oe" value="UTF-8" />
+ <input type="hidden" name="domains" value="" />
+ <input type="hidden" name="sitesearch" value="" />
+ <input type="text" name="q" maxlength="255" value="" />
+ <input type="submit" name="btnG" value="Google Search" />
+ </form>
+ </td>
+ </tr>
+</table>
+
+<div id="PageContent">
+ <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+ <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+ <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+ <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+ <div style="margin: 0px 10px 8px 10px" class="pagetitle">Basic Validation</div>
+
+ <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14196">
+ <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14196">Edit Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+ <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14196">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14196">Add Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14196">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14196">Add News</a>
+ </div>
+ </div>
+
+ <div class="pagecontent">
+ <div class="wiki-content">
+ <div id="ConfluenceContent"><p>Let's configure a basic validation workflow, step by step.</p>
+
+<h2><a shape="rect" name="BasicValidation-Step1"></a>Step 1</h2>
+
+<p>Create the input form.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+
+<html>
+<head>
+ <title>Struts2 Showcase - Validation - Basic</title>
+ <s:head/>
+</head>
+
+<body>
+
+<div class="page-header">
+ <h1>Basic validation Example</h1>
+</div>
+
+<div class="container-fluid">
+ <div class="row-fluid">
+ <div class="span12">
+
+ <p>
+ <b>What is your favorite color?</b>
+
+ <p/>
+
+ <s:form method="post">
+ <s:textfield label="Name" name="name"/>
+ <s:textfield label="Age" name="age"/>
+ <s:textfield label="Favorite color" name="answer"/>
+ <s:submit cssClass="btn btn-primary"/>
+ </s:form>
+
+
+ <s:include value="footer.jsp"/>
+ </div>
+ </div>
+</div>
+</body>
+</html>
+]]></script>
+</div></div>
+
+<h2><a shape="rect" name="BasicValidation-Step2"></a>Step 2</h2>
+
+<p>Create the Action class.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+
+public class QuizAction extends ActionSupport {
+
+ private static final long serialVersionUID = -7505437345373234225L;
+
+ String name;
+ int age;
+ String answer;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+ public String getAnswer() {
+ return answer;
+ }
+
+ public void setAnswer(String answer) {
+ this.answer = answer;
+ }
+}
+
+]]></script>
+</div></div>
+
+<h2><a shape="rect" name="BasicValidation-Step3"></a>Step 3</h2>
+
+<p>Create the validators. The <tt>validation.xml</tt> format is either <tt><ActionClassName>-validation.xml</tt> or <tt><ActionClassName>-<ActionAliasName>-validation.xml</tt>.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+<!--
+ Add the following DOCTYPE declaration as first line of your XXX-validation.xml file:
+ <!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
+-->
+<validators>
+ <field name="name">
+ <field-validator type="requiredstring">
+ <message>You must enter a name</message>
+ </field-validator>
+ </field>
+ <field name="age">
+ <field-validator type="int">
+ <param name="min">13</param>
+ <param name="max">19</param>
+ <message>Only people ages 13 to 19 may take this quiz</message>
+ </field-validator>
+ </field>
+</validators>
+
+]]></script>
+</div></div>
+
+<h2><a shape="rect" name="BasicValidation-Step4"></a>Step 4</h2>
+
+<p>Make sure there is a result for "input" listed in the struts.xml for when the validation fails:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+<action name="HelloWorld" class="tutorial.HelloWorld">
+<result name="success">/tutorial/createconfirm.jsp</result>
+<result name="error">/tutorial/error.jsp</result>
+<result name="input">/tutorial/create.jsp</result>
+</action>
+]]></script>
+</div></div>
+
+<p>If you don't have this, you'll get a: "No result defined for action xxx.xxx.tutorial.HellowWorld and result input" error </p></div>
+ </div>
+
+
+ </div>
+</div>
+<div class="footer">
+ Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file
Added: websites/production/struts/content/development/2.x/docs/bean-configuration.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/bean-configuration.html (added)
+++ websites/production/struts/content/development/2.x/docs/bean-configuration.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,179 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html>
+<head>
+ <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+ <style type="text/css">
+ .dp-highlighter {
+ width:95% !important;
+ }
+ </style>
+ <style type="text/css">
+ .footer {
+ background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+ background-repeat: repeat-x;
+ background-position: left top;
+ padding-top: 4px;
+ color: #666;
+ }
+ </style>
+ <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+ <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+ <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+ <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+
+ <script type="text/javascript">
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
+ <script type="text/javascript" language="javascript">
+ var hide = null;
+ var show = null;
+ var children = null;
+
+ function init() {
+ /* Search form initialization */
+ var form = document.forms['search'];
+ if (form != null) {
+ form.elements['domains'].value = location.hostname;
+ form.elements['sitesearch'].value = location.hostname;
+ }
+
+ /* Children initialization */
+ hide = document.getElementById('hide');
+ show = document.getElementById('show');
+ children = document.all != null ?
+ document.all['children'] :
+ document.getElementById('children');
+ if (children != null) {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ }
+
+ function showChildren() {
+ children.style.display = 'block';
+ show.style.display = 'none';
+ hide.style.display = 'inline';
+ }
+
+ function hideChildren() {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ </script>
+ <title>Bean Configuration</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tr class="topBar">
+ <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+ <a href="home.html">Home</a> > <a href="guides.html">Guides</a> > <a href="core-developers-guide.html">Core Developers Guide</a> > <a href="configuration-elements.html">Configuration Elements</a> > <a href="bean-configuration.html">Bean Configuration</a>
+ </td>
+ <td align="right" valign="middle" nowrap>
+ <form name="search" action="http://www.google.com/search" method="get">
+ <input type="hidden" name="ie" value="UTF-8" />
+ <input type="hidden" name="oe" value="UTF-8" />
+ <input type="hidden" name="domains" value="" />
+ <input type="hidden" name="sitesearch" value="" />
+ <input type="text" name="q" maxlength="255" value="" />
+ <input type="submit" name="btnG" value="Google Search" />
+ </form>
+ </td>
+ </tr>
+</table>
+
+<div id="PageContent">
+ <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+ <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+ <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+ <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+ <div style="margin: 0px 10px 8px 10px" class="pagetitle">Bean Configuration</div>
+
+ <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=29601">
+ <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=29601">Edit Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+ <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=29601">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=29601">Add Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=29601">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=29601">Add News</a>
+ </div>
+ </div>
+
+ <div class="pagecontent">
+ <div class="wiki-content">
+ <div id="ConfluenceContent"><p>Internally, the framework uses its own <a shape="rect" href="dependency-injection.html" title="Dependency Injection">Dependency Injection</a> container. The container loads key framework objects, so that any piece of the framework can be replaced, extended, or removed in a standard, consistent way. <a shape="rect" href="plugins.html" title="Plugins">Plugins</a>, in particular, leverage this capability to extend the framework to provide support for third-party libraries like <a shape="rect" href="https://cwiki.apache.org/confluence/display/S2PLUGINS/Spring+Plugin" title="Spring Plugin">Spring</a> or <a shape="rect" href="https://cwiki.apache.org/confluence/display/S2PLUGINS/Sitemesh+Plugin" title="Sitemesh Plugin">Sitemesh</a>. </p>
+
+<p><img align="middle" class="emoticon" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" height="16" width="16" alt="" border="0"> Most applications won't need to extend the Bean Configuration. </p>
+
+<h2><a shape="rect" name="BeanConfiguration-Beans"></a>Beans</h2>
+
+<p>The bean element has one required attribute, <tt>class</tt>, which specifies the Java class to be created or manipulated. A bean can either </p>
+
+<ol><li>be created by the framework's container and injected into internal framework objects, or</li><li>have values injected to its static methods</li></ol>
+
+
+<p>The first use, object injection, is generally accompanied by the <tt>type</tt> attribute, which tells the container which interface this object implements. </p>
+
+<p>The second use, value injection, is good for allowing objects not created by the container to receive framework constants. Objects using value inject must define the the <tt>static</tt> attribute.</p>
+
+<div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Attribute </th><th colspan="1" rowspan="1" class="confluenceTh"> Required </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> class </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>yes</b> </td><td colspan="1" rowspan="1" class="confluenceTd"> the name of the bean class </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> type </td><td colspan="1" rowspan="1" class="confluenceTd"> no </td><td colspan="1" rowspan="1" class="confluenceTd"> the primary Java interface this class implements </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> name </td><td colspan="1" rowspan="1" class="confluenceTd"> no </td><td colspan="1" rowspan="1" class="confluenceTd"> the unique name of this bean; must be unique among other beans that specify the same <tt>type</tt> </td></tr><tr><td colspan="1" rows
pan="1" class="confluenceTd"> scope </td><td colspan="1" rowspan="1" class="confluenceTd"> no </td><td colspan="1" rowspan="1" class="confluenceTd"> the scope of the bean; must be either <tt>default</tt>, <tt>singleton</tt>, <tt>request</tt>, <tt>session</tt>, <tt>thread</tt> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> static </td><td colspan="1" rowspan="1" class="confluenceTd"> no </td><td colspan="1" rowspan="1" class="confluenceTd"> whether to inject static methods or not; shouldn't be <tt>true</tt> when the <tt>type</tt> is specified </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> optional </td><td colspan="1" rowspan="1" class="confluenceTd"> no </td><td colspan="1" rowspan="1" class="confluenceTd"> whether the bean is optional or not </td></tr></tbody></table>
+</div>
+
+
+<h3><a shape="rect" name="BeanConfiguration-Sampleusage"></a>Sample usage </h3>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Bean Example (struts.xml)</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+<struts>
+
+ <bean type="com.opensymphony.xwork2.ObjectFactory" name="myfactory" class="com.company.myapp.MyObjectFactory" />
+
+ ...
+
+</struts>
+]]></script>
+</div></div></div>
+ </div>
+
+
+ </div>
+</div>
+<div class="footer">
+ Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file
Added: websites/production/struts/content/development/2.x/docs/building-struts-2-fast-track-release.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/building-struts-2-fast-track-release.html (added)
+++ websites/production/struts/content/development/2.x/docs/building-struts-2-fast-track-release.html Wed Jul 17 09:31:08 2013
@@ -0,0 +1,367 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html>
+<head>
+ <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+ <style type="text/css">
+ .dp-highlighter {
+ width:95% !important;
+ }
+ </style>
+ <style type="text/css">
+ .footer {
+ background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+ background-repeat: repeat-x;
+ background-position: left top;
+ padding-top: 4px;
+ color: #666;
+ }
+ </style>
+ <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
+ <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
+ <script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
+ <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
+ <script src='http://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
+
+ <script type="text/javascript">
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
+ <script type="text/javascript" language="javascript">
+ var hide = null;
+ var show = null;
+ var children = null;
+
+ function init() {
+ /* Search form initialization */
+ var form = document.forms['search'];
+ if (form != null) {
+ form.elements['domains'].value = location.hostname;
+ form.elements['sitesearch'].value = location.hostname;
+ }
+
+ /* Children initialization */
+ hide = document.getElementById('hide');
+ show = document.getElementById('show');
+ children = document.all != null ?
+ document.all['children'] :
+ document.getElementById('children');
+ if (children != null) {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ }
+
+ function showChildren() {
+ children.style.display = 'block';
+ show.style.display = 'none';
+ hide.style.display = 'inline';
+ }
+
+ function hideChildren() {
+ children.style.display = 'none';
+ show.style.display = 'inline';
+ hide.style.display = 'none';
+ }
+ </script>
+ <title>Building Struts 2 - Fast track release</title>
+</head>
+<body onload="init()">
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tr class="topBar">
+ <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
+ <a href="home.html">Home</a> > <a href="guides.html">Guides</a> > <a href="contributors-guide.html">Contributors Guide</a> > <a href="creating-and-signing-a-distribution.html">Creating and Signing a Distribution</a> > <a href="creating-and-signing-a-struts-23x-distribution.html">Creating and Signing a Struts 2.3.x Distribution</a> > <a href="building-struts-2-fast-track-release.html">Building Struts 2 - Fast track release</a>
+ </td>
+ <td align="right" valign="middle" nowrap>
+ <form name="search" action="http://www.google.com/search" method="get">
+ <input type="hidden" name="ie" value="UTF-8" />
+ <input type="hidden" name="oe" value="UTF-8" />
+ <input type="hidden" name="domains" value="" />
+ <input type="hidden" name="sitesearch" value="" />
+ <input type="text" name="q" maxlength="255" value="" />
+ <input type="submit" name="btnG" value="Google Search" />
+ </form>
+ </td>
+ </tr>
+</table>
+
+<div id="PageContent">
+ <div class="pageheader" style="padding: 6px 0px 0px 0px;">
+ <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+ <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+ <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
+ <div style="margin: 0px 10px 8px 10px" class="pagetitle">Building Struts 2 - Fast track release</div>
+
+ <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27834014">
+ <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27834014">Edit Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+ <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=27834014">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=27834014">Add Page</a>
+
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27834014">
+ <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
+ height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
+ <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27834014">Add News</a>
+ </div>
+ </div>
+
+ <div class="pagecontent">
+ <div class="wiki-content">
+ <div id="ConfluenceContent"><h1><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Content"></a>Content</h1>
+<style type="text/css">/*<![CDATA[*/
+div.rbtoc1370246252845 {margin-left: 0px;padding: 0px;}
+div.rbtoc1370246252845 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1370246252845 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style><div class="rbtoc1370246252845">
+<ul><li><span class="TOCOutline">1</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-BuildingSteps%28Struts%29">Building Steps (Struts)</a></li><ul><li><span class="TOCOutline">1.1</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Gettingready">Getting ready</a></li><li><span class="TOCOutline">1.2</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Obtainafreshcheckoutofcreatedbranch.">Obtain a fresh checkout of created branch.</a></li><li><span class="TOCOutline">1.3</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Updateversionofarchetypes">Update version of archetypes</a></li><li><span class="TOCOutline">1.4</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Applysecuritypatch">Apply security patch</a></li><li><span class="TOCOutline">1.5</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Preparerelease">Prepare release</a></li><li><span class="TOCOutline">1.6</span> <a shape="rect" href="#BuildingStruts2
-Fasttrackrelease-Performtherelease">Perform the release</a></li><li><span class="TOCOutline">1.7</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Movetheassembliestothe%2Fwww%2Fpeople.apache.org%2Fbuilds%2Fstruts%2F%24VERSIONdir">Move the assemblies to the /www/people.apache.org/builds/struts/$VERSION dir</a></li><li><span class="TOCOutline">1.8</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Jirastuff">Jira stuff</a></li><li><span class="TOCOutline">1.9</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Voteonit">Vote on it</a></li><li><span class="TOCOutline">1.10</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Copyfiles">Copy files</a></li><li><span class="TOCOutline">1.11</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Promoterelease">Promote release</a></li><li><span class="TOCOutline">1.12</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Cleanupoldreleases">Clean up old releases</a></li><li><
span class="TOCOutline">1.13</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Waitforrsync">Wait for rsync</a></li><li><span class="TOCOutline">1.14</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-%28Optional%29UpdateSecurityBulletins">(Optional) - Update Security Bulletins</a></li><li><span class="TOCOutline">1.15</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Updatesite%28Struts2site%29">Update site (Struts 2 site)</a></li><li><span class="TOCOutline">1.16</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Updatesite%28Strutstoplevelsite%29">Update site (Struts top level site)</a></li><li><span class="TOCOutline">1.17</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Redeploythedraftdocs">Redeploy the draft docs</a></li><li><span class="TOCOutline">1.18</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Permissions">Permissions</a></li><li><span class="TOCOutline">1.19</span> <a shape="rect" href="#B
uildingStruts2-Fasttrackrelease-Postannouncements">Post announcements</a></li></ul></ul></div>
+
+<h2><a shape="rect" name="BuildingStruts2-Fasttrackrelease-BuildingSteps%28Struts%29"></a>Building Steps (Struts)</h2>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Gettingready"></a>Getting ready</h3>
+<ol><li>When a serious security issue arises, we should try to create a <tt>STRUTS_#_#_#_X</tt> branch from the last GA release (from tag - check it out and use <tt>mvn release:branch</tt> as below).
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>mvn release:branch -DbranchName=STRUTS_#_#_#_X -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true
+</pre>
+</div></div>
+<p>Read the <a shape="rect" class="external-link" href="http://maven.apache.org/maven-release/maven-release-plugin/examples/branch.html">maven release:branch</a> docs for further details or alternatively </p></li><li>Apply to that branch only the security patch</li><li>Commit the fix. No reference should be make to the commit being related to a security vulnerability.</li><li>If the patch first applies to some other dependency, implore the other group to do the same, to avoid side-effects from other changes.</li><li>Release the upcoming version in JIRA (under Administration/Manage Releases) and tag the release date</li><li>Create DONE and TODO filters for the new version, share with all, and remove obsolete TODO filter</li><li>Create a new Version Notes page in Confluence, link from <a shape="rect" href="migration-guide.html" title="Migration Guide">Migration Guide</a>, and link to prior release page and JIRA DONE filters of the version to release, secure the page to allow access o
nly member of struts-committers group in Confluence</li></ol>
+
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Obtainafreshcheckoutofcreatedbranch."></a>Obtain a fresh checkout of created branch.</h3>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+svn co https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_#_#_#_X STRUTS_#_#_#_X
+]]></script>
+</div></div>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Updateversionofarchetypes"></a>Update version of archetypes</h3>
+<p>Edit <tt>src/site/resources/archetype-catalog.xml</tt> and change version of archetypes to current $VERSION, save and commit.</p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Applysecuritypatch"></a>Apply security patch</h3>
+<p>Apply and commit security patch.</p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Preparerelease"></a>Prepare release</h3>
+<p>Tag the release by using the "release:prepare" goal of Maven: </p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+mvn release:prepare -Dusername=yourSvnUsername -Dpassword=yourSvnPassword -DautoVersionSubmodules=true
+]]></script>
+</div></div>
+
+<p>For a <a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/usage.html">dry run</a>, add '-DdryRun=true'. If you do a dry run, use 'mvn release:clean' to clean up after you have looked at the output. </p>
+
+<p>When prompted for the SCM tag name, follow this pattern: STRUTS_2_3_[PATCH_VERSION]</p>
+
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">For some reason, when using svn client 1.5, the release plugin might fail to tag the release, if it fails, run:<br clear="none">
+svn up -r head<br clear="none">
+mvn release:prepare -Dresume</td></tr></table></div>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0-beta-7:prepare (default-cli) on project struts2-parent: Unable to tag SCM
+[ERROR] Provider message:
+[ERROR] The svn tag command failed.
+[ERROR] Command output:
+[ERROR] svn: Commit failed (details follow):
+[ERROR] svn: No such revision 1223030
+]]></script>
+</div></div>
+
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">If you get the error message above, try to re-run mvn release:prepare -Dusername=yourSvnUsername -Dpassword=yourSvnPassword -DautoVersionSubmodules=true command again, -Dresume flag is set to true by default and the plugin will resume the release process from where it failed before.</td></tr></table></div>
+
+<p>This step will (<a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html">more information</a>):</p>
+<ul><li>Check that there are no uncommitted changes in the sources</li><li>Check that there are no SNAPSHOT dependencies</li><li>Change the version in the poms from x-SNAPSHOT to a new version (you will be prompted for the versions to use)</li><li>Transform the SCM information in the POM to include the final destination of the tag</li><li>Run the project tests against the modified POMs to confirm everything is in working order</li><li>Commit the modified POMs</li><li>Tag the code in the SCM with a version name (this will be prompted for)</li><li>Bump the version in the POMs to a new value y-SNAPSHOT (these values will also be prompted for)</li><li>Commit the modified POMs</li></ul>
+
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Performtherelease"></a>Perform the release </h3>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+mvn release:perform -Dusername=yourSvnUsername
+]]></script>
+</div></div>
+
+<p>This step will (<a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/examples/perform-release.html">more information</a>):</p>
+<ul><li>Checkout from an SCM URL with optional tag</li><li>Run the predefined Maven goals to release the project (by default, deploy site-deploy)</li></ul>
+
+
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">N.B.: this step takes a long time (about 2 hours with a broadband connection)</td></tr></table></div>
+
+<p>After this step the artifacts will be hosted by <a shape="rect" class="external-link" href="http://repository.apache.org/">Nexus </a></p>
+
+<p>If you need to run perform again, (or in a different box), do:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+svn co http://svn.apache.org/repos/asf/struts/struts2/tags/$VERSION
+cd $VERSION
+mvn deploy site-deploy --no-plugin-updates -DperformRelease=true
+]]></script>
+</div></div>
+
+<p>Next, log in to <a shape="rect" class="external-link" href="http://repository.apache.org/">Nexus </a> and <b>close</b> staging repository.</p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Movetheassembliestothe%2Fwww%2Fpeople.apache.org%2Fbuilds%2Fstruts%2F%24VERSIONdir"></a>Move the assemblies to the /www/people.apache.org/builds/struts/$VERSION dir</h3>
+
+<p>After closing repository in Nexus, check if the version is available from staging repository as below:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION/
+]]></script>
+</div></div>
+
+<p>In order to move the assemblies login to people.apache.org and execute the following code: </p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[
+#!/bin/sh
+# create the destination directory
+mkdir $VERSION
+cd $VERSION
+
+# get the distro
+wget -erobots=off -nv -l 1 --accept=zip,md5,sha1,asc -r --no-check-certificate -nd -nH https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION
+
+# rename files
+for f in *2-assembly*.zip*
+do
+ mv $f `echo $f | sed s/2-assembly//g`
+done
+
+# remove unneeded files
+for f in struts2-assembly-*.pom*
+do
+ rm $f
+done
+]]></script>
+</div></div>
+<p>After that move the assemblies directory to the builds destination with</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+mv $VERSION /www/people.apache.org/builds/struts/
+]]></script>
+</div></div>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Jirastuff"></a>Jira stuff </h3>
+<ul><li>Update JIRA roadmap with tag/release date - release the version in JIRA</li><li>Add next milestone to the JIRA roadmap</li><li>Create DONE and TODO filters, share with all, and remove obsolete TODO filter</li><li>Create new release page, link from <a shape="rect" href="migration-guide.html" title="Migration Guide">Migration Guide</a>, and link to prior release page and JIRA filters</li></ul>
+
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Voteonit"></a>Vote on it</h3>
+<p>Post a release/quality vote to the dev list (and <b>only</b> the dev list). The example mail is on <a shape="rect" href="sample-announcements.html" title="Sample announcements">Sample announcements</a> page. Include the term "fast-track" in the subject, as: [VOTE] Struts 2.0.9.1 quality (fast track).</p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Copyfiles"></a>Copy files</h3>
+<p>After the vote, if the distribution is being mirrored (there was a favourable release vote) copy the Sources and Binaries:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+ssh people.apache.org
+cd /www/people.apache.org/builds/struts/$VERSION
+cp struts-$VERSION-src.* /www/www.apache.org/dist/struts/source
+cp struts-$VERSION-docs.* /www/www.apache.org/dist/struts/documentation
+cp struts-$VERSION-lib.* /www/www.apache.org/dist/struts/library
+cp struts-$VERSION-apps.* /www/www.apache.org/dist/struts/examples
+cp struts-$VERSION-all.* /www/www.apache.org/dist/struts/binaries
+]]></script>
+</div></div>
+
+<p>If a new DTD was defined, copy it to /www/struts.apache.org/dtds/ and change permission to struts group (chown :struts *.dtd) and write rights (chmod g+w *.dtd).</p>
+
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">The default setup on people.apache.org will leave the files and directories only changeable by the user who creates them. The last two steps will allow future releases to go smoothly.</td></tr></table></div>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Promoterelease"></a>Promote release</h3>
+<p>Log in again to <a shape="rect" class="external-link" href="http://repository.apache.org/">Nexus</a> and <b>release</b> the repository, it will be automatically replicated across Maven Repositories<br clear="none">
+See <a shape="rect" class="external-link" href="http://maven.apache.org/developers/release/apache-release.html">Releasing a Maven-based project</a> for further details.</p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Cleanupoldreleases"></a>Clean up old releases</h3>
+<p>Remove the old files from under /www/www.apache.org/dist/struts/ to synchronize only the latest version with peers. All the files from /www/www.apache.org/dist/ are always mirrored to <a shape="rect" class="external-link" href="http://archive.apache.org/dist/struts/">http://archive.apache.org/dist/struts/</a></p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Waitforrsync"></a>Wait for rsync</h3>
+<p>Wait 24 hours before proceeding. </p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-%28Optional%29UpdateSecurityBulletins"></a>(Optional) - Update Security Bulletins</h3>
+<p>If the release will fix a - hopefully yet undisclosed - security issue, it's now time to update the <a shape="rect" href="security-bulletins.html" title="Security Bulletins">Security Bulletins</a> page and add a new announcement. For a template, just check former announcements</p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Updatesite%28Struts2site%29"></a>Update site (Struts 2 site)</h3>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+ssh people.apache.org
+export VERSION=2.#.#
+
+unzip /www/people.apache.org/builds/struts/$VERSION/struts-$VERSION-docs.zip -d ~/docs
+#now the docs are under ~/docs/struts-$VERSION/docs
+mkdir -p /www/struts.apache.org/$VERSION
+mv ~/docs/struts-$VERSION/docs/* /www/struts.apache.org/$VERSION
+chmod -R g+w /www/struts.apache.org/$VERSION
+chown -R :struts /www/struts.apache.org/$VERSION
+]]></script>
+</div></div>
+
+<p>Edit /www/struts.apache.org/$VERSION/archetype-catalog.xml and update the version of artifacts</p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Updatesite%28Strutstoplevelsite%29"></a>Update site (Struts top level site)</h3>
+<ul><li>Check out site src code
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+svn co https://svn.apache.org/repos/asf/struts/site/ struts-site
+]]></script>
+</div></div></li><li>Update xml files
+ <ul><li>struts-site/src/site/xdoc/announce.xml (if applicable, refer also to corresponding security bulletin)</li><li>struts-site/src/site/xdoc/downloads.xml (remove previous version)</li><li>struts-site/src/site/xdoc/download.xml (remove previous version)</li><li>struts-site/src/site/xdoc/index.xml</li><li>struts-site/src/site/site.xml</li><li>struts-site/src/site/resources/archetype-catalog.xml</li></ul>
+ </li><li>Commit the changes</li><li>Generate the site
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+mvn site:site
+]]></script>
+</div></div></li><li>Open <tt>struts-site/target/site/index.html</tt> and verify the urls and versions are right</li><li>Deploy site
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+mvn site-deploy
+]]></script>
+</div></div>
+<p>It takes a few hours for the site changes to go live</p></li></ul>
+
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Redeploythedraftdocs"></a>Redeploy the draft docs</h3>
+<p>Make public available all the pages that could leak confidential information about the vulnerability. Wait or manually export the space in Confluence. Build snapshot locally and copy assembly/target/assembly/out/struts2-#.#.#-SNAPSHOT-docs.zip to people.apache.org and update /www/struts.apache.org/2.x/docs</p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Permissions"></a>Permissions </h3>
+<p>After updating the site, be sure that the permissions are set to group writeable (<tt>$ chmod -R g+w .</tt> and <tt>$ chown -R :struts .</tt>) </p>
+
+<h3><a shape="rect" name="BuildingStruts2-Fasttrackrelease-Postannouncements"></a>Post announcements </h3>
+<p>We leave this as the last step, once the artifacts have had time to sync up on the mirrors. <br clear="none">
+Announce the release and the vulnerability. Typically this will be sent to the reporter, the project's users list (user@struts.a.o), the project's dev list (dev@struts.a.o), the project's announce list (announcements@struts.a.o), security@apache.org, full-disclosure@lists.grok.org.uk and bugtraq@securityfocus.com.<br clear="none">
+Samples are available at <a shape="rect" href="sample-announcements.html" title="Sample announcements">Sample announcements</a> page.</p></div>
+ </div>
+
+
+ </div>
+</div>
+<div class="footer">
+ Generated by CXF SiteExporter
+</div>
+</body>
+</html>
\ No newline at end of file