http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/file-upload-interceptor.html
----------------------------------------------------------------------
diff --git a/content/docs/file-upload-interceptor.html 
b/content/docs/file-upload-interceptor.html
new file mode 100644
index 0000000..b73a365
--- /dev/null
+++ b/content/docs/file-upload-interceptor.html
@@ -0,0 +1,265 @@
+<!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='https://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
+    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
+    <script src='https://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushCss.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>File Upload Interceptor</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>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a 
href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a 
href="core-developers-guide.html">Core Developers Guide</a>&nbsp;&gt;&nbsp;<a 
href="interceptors.html">Interceptors</a>&nbsp;&gt;&nbsp;<a 
href="file-upload-interceptor.html">File Upload Interceptor</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">File Upload 
Interceptor</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14299";>
+                <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=14299";>Edit
 Page</a>
+            &nbsp;
+            <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>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14299";>
+                <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=14299";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14299";>
+                <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=14299";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><div 
class="confluence-information-macro confluence-information-macro-note"><span 
class="aui-icon aui-icon-small aui-iconfont-warning 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
+<p>  See <a shape="rect" href="file-upload.html">this page</a> for more 
examples and advanced configuration</p></div></div>
+
+<p></p><p>
+Interceptor that is based off of MultiPartRequestWrapper, which is 
automatically applied for any request that
+includes a file. It adds the following parameters, where [File Name] is the 
name given to the file uploaded by the
+HTML form:
+</p>
+<ul></ul><p></p><ul><li>[File Name] : File - the actual 
File</li></ul><p></p><ul><li>[File Name]ContentType : String - the content type 
of the file</li></ul><p></p><ul><li>[File Name]FileName : String - the actual 
name of the file uploaded (not the HTML name)</li></ul><p></p>
+
+<p></p><p>You can get access to these files by merely providing setters in 
your action that correspond to any of the three
+patterns above, such as setDocument(File document), 
setDocumentContentType(String contentType), etc.
+<br clear="none">See the example code section.
+</p>
+
+<p></p><p> This interceptor will add several field errors, assuming that the 
action implements ValidationAware.
+These error messages are based on several i18n values stored in 
struts-messages.properties, a default i18n file
+processed for all i18n requests. You can override the text of these messages 
by providing text for the following
+keys:
+</p>
+
+<p></p><ul></ul><p></p><ul><li>struts.messages.error.uploading - a general 
error that occurs when the file could not be 
uploaded</li></ul><p></p><ul><li>struts.messages.error.file.too.large - occurs 
when the uploaded file is too 
large</li></ul><p></p><ul><li>struts.messages.error.content.type.not.allowed - 
occurs when the uploaded file does not match the expected
+content types 
specified</li></ul><p></p><ul><li>struts.messages.error.file.extension.not.allowed
 - occurs when the uploaded file does not match the expected
+file extensions specified</li></ul><p></p>
+
+
+<h2 id="FileUploadInterceptor-Parameters">Parameters</h2>
+
+
+<p></p><ul></ul><p></p><ul><li>maximumSize (optional) - the maximum size (in 
bytes) that the interceptor will allow a file reference to be set
+on the action. Note, this is <b>not</b> related to the various properties 
found in struts.properties.
+Default to approximately 2MB.</li></ul><p></p><ul><li>allowedTypes (optional) 
- a comma separated list of content types (ie: text/html) that the interceptor 
will allow
+a file reference to be set on the action. If none is specified allow all types 
to be uploaded.</li></ul><p></p><ul><li>allowedExtensions (optional) - a comma 
separated list of file extensions (ie: .html) that the interceptor will allow
+a file reference to be set on the action. If none is specified allow all 
extensions to be uploaded.</li></ul>
+
+
+
+<h2 id="FileUploadInterceptor-ExtendingtheInterceptor">Extending the 
Interceptor</h2>
+
+<p></p><p>
+You can extend this interceptor and override the acceptFile method to provide 
more control over which files
+are supported and which are not.
+</p>
+
+<h2 id="FileUploadInterceptor-Examples">Examples</h2>
+<p><strong>Example action mapping:</strong></p>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
+&lt;action name=&quot;doUpload&quot; 
class=&quot;com.example.UploadAction&quot;&gt;
+    &lt;interceptor-ref name=&quot;fileUpload&quot;/&gt;
+    &lt;interceptor-ref name=&quot;basicStack&quot;/&gt;
+    &lt;result name=&quot;success&quot;&gt;good_result.jsp&lt;/result&gt;
+&lt;/action&gt;
+]]></script>
+</div></div>
+
+<p>Notice the interceptor configuration in the preceding example. </p>
+
+<p><strong>Example JSP form tags:</strong></p>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
+&lt;s:form action=&quot;doUpload&quot; method=&quot;post&quot; 
enctype=&quot;multipart/form-data&quot;&gt;
+    &lt;s:file name=&quot;upload&quot; label=&quot;File&quot;/&gt;
+    &lt;s:submit/&gt;
+&lt;/s:form&gt;
+]]></script>
+</div></div>
+<p></p><p>
+You must set the encoding to <code>multipart/form-data</code> in the form 
where the user selects the file to upload.
+</p>
+<p><strong>Example Action class:</strong></p>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
+   package com.example;
+
+   import java.io.File;
+   import com.opensymphony.xwork2.ActionSupport;
+
+   public UploadAction extends ActionSupport {
+      private File file;
+      private String contentType;
+      private String filename;
+
+      public void setUpload(File file) {
+         this.file = file;
+      }
+
+      public void setUploadContentType(String contentType) {
+         this.contentType = contentType;
+      }
+
+      public void setUploadFileName(String filename) {
+         this.filename = filename;
+      }
+
+      public String execute() {
+         //...
+         return SUCCESS;
+      }
+ }
+]]></script>
+</div></div>
+
+<p><strong>Setting parameters example:</strong></p>
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">
+&lt;interceptor-ref name="fileUpload"&gt;
+  &lt;param name="allowedTypes"&gt;
+     image/png,image/gif,image/jpeg
+  &lt;/param&gt;
+&lt;/interceptor-ref&gt;
+</pre>
+</div></div>
+<p>This part is optional and would be done in place of the 
<code>&lt;interceptor-ref name="fileUpload"/&gt;</code> line in the action 
mapping example above.</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/file-upload.html
----------------------------------------------------------------------
diff --git a/content/docs/file-upload.html b/content/docs/file-upload.html
new file mode 100644
index 0000000..bad3f45
--- /dev/null
+++ b/content/docs/file-upload.html
@@ -0,0 +1,389 @@
+<!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='https://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
+    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
+    <script src='https://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushCss.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>File Upload</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>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a 
href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a 
href="core-developers-guide.html">Core Developers Guide</a>&nbsp;&gt;&nbsp;<a 
href="interceptors.html">Interceptors</a>&nbsp;&gt;&nbsp;<a 
href="file-upload.html">File Upload</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">File 
Upload</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=86602";>
+                <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=86602";>Edit
 Page</a>
+            &nbsp;
+            <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>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=86602";>
+                <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=86602";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=86602";>
+                <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=86602";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><p>The Struts 2 framework provides 
built-in support for processing file uploads that conform to <a shape="rect" 
class="external-link" href="http://www.ietf.org/rfc/rfc1867.txt"; 
rel="nofollow">RFC 1867</a>, "Form-based File Upload in HTML". When correctly 
configured the framework will pass uploaded file(s) into your Action class. 
Support for individual and multiple file uploads are provided. When a file is 
uploaded it will typically be stored in a temporary directory. Uploaded files 
should be processed or moved by your Action class to ensure the data is not 
lost. Be aware that servers may have a security policy in place that prohibits 
you from writing to directories other than the temporary directory and the 
directories that belong to your web application.</p><p><style 
type="text/css">/*<![CDATA[*/
+div.rbtoc1499928483092 {padding: 0px;}
+div.rbtoc1499928483092 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499928483092 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1499928483092">
+<ul class="toc-indentation"><li><a shape="rect" 
href="#FileUpload-Dependencies">Dependencies</a></li><li><a shape="rect" 
href="#FileUpload-BasicUsage">Basic Usage</a></li><li><a shape="rect" 
href="#FileUpload-UploadingMultipleFiles">Uploading Multiple Files</a>
+<ul class="toc-indentation"><li><a shape="rect" 
href="#FileUpload-UploadingMultipleFilesusingArrays">Uploading Multiple Files 
using Arrays</a></li><li><a shape="rect" 
href="#FileUpload-UploadingMultipleFilesusingLists">Uploading Multiple Files 
using Lists</a></li></ul>
+</li><li><a shape="rect" href="#FileUpload-AdvancedConfiguration">Advanced 
Configuration</a>
+<ul class="toc-indentation"><li><a shape="rect" 
href="#FileUpload-FileSizeLimits">File Size Limits</a></li><li><a shape="rect" 
href="#FileUpload-FileTypes">File Types</a></li><li><a shape="rect" 
href="#FileUpload-ErrorMessages">Error Messages</a></li><li><a shape="rect" 
href="#FileUpload-TemporaryDirectories">Temporary Directories</a></li><li><a 
shape="rect" href="#FileUpload-AlternateLibraries">Alternate 
Libraries</a></li><li><a shape="rect" 
href="#FileUpload-Requestvalidation">Request validation</a></li><li><a 
shape="rect" href="#FileUpload-Disablingfileuploadsupport">Disabling file 
upload support</a></li></ul>
+</li></ul>
+</div><h2 id="FileUpload-Dependencies">Dependencies</h2><p>The Struts 2 
framework leverages add-on libraries to handle the parsing of uploaded files. 
These libraries are not included in the Struts distribution, you must add them 
into your project. The libraries needed are:</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Library</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>URL</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Struts 2.0.x</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Struts 2.1.x</p></th><th colspan="1" rowspan="1" 
class="confluenceTh">Struts 2.5.x</th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Commons-FileUpload</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><a shape="rect" class="external-link" 
href="http://commons.apache.org/fileupload/";>http://commons.apache.org/fileupload/</a></td><td
 colspan="1" rowspan="1" class="confluenc
 eTd"><p>1.1.1</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>1.2.1</p></td><td colspan="1" rowspan="1" 
class="confluenceTd">1.3.2</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Commons-IO</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><a shape="rect" class="external-link" 
href="http://commons.apache.org/io/";>http://commons.apache.org/io/</a></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>1.0</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>1.3.2</p></td><td colspan="1" rowspan="1" 
class="confluenceTd">2.4</td></tr></tbody></table></div><p>If you are using 
Maven then you can add these libraries as dependencies in your project's 
pom.xml.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Struts 
2.0.x File Upload Dependencies</b></div><div class="codeContent panelContent 
pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;dependency&gt;
+    &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
+    &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
+    &lt;version&gt;1.1.1&lt;/version&gt;
+&lt;/dependency&gt;
+&lt;dependency&gt;
+    &lt;groupId&gt;commons-io&lt;/groupId&gt;
+    &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
+    &lt;version&gt;1.0&lt;/version&gt;
+&lt;/dependency&gt;
+</pre>
+</div></div><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Struts 
2.1.x File Upload Dependencies</b></div><div class="codeContent panelContent 
pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;dependency&gt;
+    &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
+    &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
+    &lt;version&gt;1.2.1&lt;/version&gt;
+&lt;/dependency&gt;
+&lt;dependency&gt;
+    &lt;groupId&gt;commons-io&lt;/groupId&gt;
+    &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
+    &lt;version&gt;1.3.2&lt;/version&gt;
+&lt;/dependency&gt;
+</pre>
+</div></div><h2 id="FileUpload-BasicUsage">Basic Usage</h2><p>The 
<code>org.apache.struts2.interceptor.FileUploadInterceptor</code> class is 
included as part of the <code>defaultStack</code>. As long as the required 
libraries are added to your project you will be able to take advantage of of 
the Struts 2 fileUpload capability. Configure an Action mapping for your Action 
class as you typically would.</p><p><strong>Example action 
mapping:</strong></p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;action name="doUpload" 
class="com.example.UploadAction"&gt;
+    &lt;result name="success"&gt;good_result.jsp&lt;/result&gt;
+&lt;/action&gt;
+</pre>
+</div></div><p>A form must be create with a form field of type file, 
<code>&lt;INPUT type="file" name="upload"&gt;</code>. The form used to upload 
the file must have its encoding type set to multipart/form-data, <code>&lt;FORM 
action="doUpload" enctype="multipart/form-data" method="post"&gt;</code>. The 
standard procedure for adding these elements is by using the Struts 2 tag 
libraries as shown in the following example:</p><p><strong>Example JSP form 
tags:</strong></p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
+&lt;s:form action=&quot;doUpload&quot; method=&quot;post&quot; 
enctype=&quot;multipart/form-data&quot;&gt;
+    &lt;s:file name=&quot;upload&quot; label=&quot;File&quot;/&gt;
+    &lt;s:submit/&gt;
+&lt;/s:form&gt;
+]]></script>
+</div></div>The fileUpload interceptor will use setter injection to insert the 
uploaded file and related data into your Action class. For a form field named 
<strong>upload</strong> you would provide the three setter methods shown in the 
following example:<p><strong>Example Action class:</strong></p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">package com.example;
+
+   import java.io.File;
+   import com.opensymphony.xwork2.ActionSupport;
+
+   public class UploadAction extends ActionSupport {
+      private File file;
+      private String contentType;
+      private String filename;
+
+      public void setUpload(File file) {
+         this.file = file;
+      }
+
+      public void setUploadContentType(String contentType) {
+         this.contentType = contentType;
+      }
+
+      public void setUploadFileName(String filename) {
+         this.filename = filename;
+      }
+
+      public String execute() {
+         //...
+         return SUCCESS;
+      }
+ }
+</pre>
+</div></div><p>The purpose of each one of these methods is described in the 
table below. Notice that if you have multiple file form elements with different 
names you would be required to have another corresponding set of these methods 
for each file uploaded.</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Method Signature</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>setX(File file)</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The file that contains the content of the 
uploaded file. This is a temporary file and <code>file.getName()</code> will 
not return the original name of the file</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>setXContentType(String 
contentType)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The 
mime type of the uploaded file</p></td></tr><tr><td co
 lspan="1" rowspan="1" class="confluenceTd"><p>setXFileName(String 
fileName)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The 
actual file name of the uploaded file (not the HTML 
name)</p></td></tr></tbody></table></div><h2 
id="FileUpload-UploadingMultipleFiles">Uploading Multiple Files</h2><p>As 
mentioned in the previous section one technique for uploading multiple files 
would be to simply have multiple form input elements of type file all with 
different names. This would require a number of setter methods that was equal 
to 3 times the number of files being uploaded. Another option is to use Arrays 
or java.util.Lists. The following examples are taken from the Showcase example 
application that is part sample applications you can download at <a 
shape="rect" class="external-link" 
href="http://struts.apache.org/download.cgi";>http://struts.apache.org/download.cgi</a>.
 For the Action mapping details see <code>struts-fileupload.xml</code> in the 
sample application download.</
 p><h3 id="FileUpload-UploadingMultipleFilesusingArrays">Uploading Multiple 
Files using Arrays</h3><p><strong>multipleUploadUsingArray.jsp</strong> Notice 
all file input types have the same name.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: html; gutter: false; theme: Default" 
style="font-size:12px;">&lt;s:form action="doMultipleUploadUsingArray" 
method="POST" enctype="multipart/form-data"&gt;
+  &lt;s:file label="File (1)" name="upload" /&gt;
+  &lt;s:file label="File (2)" name="upload" /&gt;
+  &lt;s:file label="FIle (3)" name="upload" /&gt;
+  &lt;s:submit cssClass="btn btn-primary"/&gt;
+&lt;/s:form&gt;</pre>
+</div></div><p><strong>MultipleFileUploadUsingArrayAction.java</strong></p><p>&#160;</p><p><strong><br
 clear="none"></strong></p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">public class MultipleFileUploadUsingArrayAction extends 
ActionSupport {
+       private File[] uploads;
+       private String[] uploadFileNames;
+       private String[] uploadContentTypes;
+
+       public String upload() throws Exception {
+               System.out.println("\n\n upload2");
+               System.out.println("files:");
+               for (File u : uploads) {
+                       System.out.println("*** " + u + "\t" + u.length());
+               }
+               System.out.println("filenames:");
+               for (String n : uploadFileNames) {
+                       System.out.println("*** " + n);
+               }
+               System.out.println("content types:");
+               for (String c : uploadContentTypes) {
+                       System.out.println("*** " + c);
+               }
+               System.out.println("\n\n");
+               return SUCCESS;
+       }
+       public File[] getUpload() {
+               return this.uploads;
+       }
+       public void setUpload(File[] upload) {
+               this.uploads = upload;
+       }
+       public String[] getUploadFileName() {
+               return this.uploadFileNames;
+       }
+       public void setUploadFileName(String[] uploadFileName) {
+               this.uploadFileNames = uploadFileName;
+       }
+       public String[] getUploadContentType() {
+               return this.uploadContentTypes;
+       }
+       public void setUploadContentType(String[] uploadContentType) {
+               this.uploadContentTypes = uploadContentType;
+       }
+}</pre>
+</div></div><p>&#160;</p><h3 
id="FileUpload-UploadingMultipleFilesusingLists">Uploading Multiple Files using 
Lists</h3><p><strong>multipleUploadUsingList.jsp</strong> Notice all file input 
types have the same name.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;s:form action="doMultipleUploadUsingList" 
method="POST" enctype="multipart/form-data"&gt;
+  &lt;s:file label="File (1)" name="upload" /&gt;
+  &lt;s:file label="File (2)" name="upload" /&gt;
+  &lt;s:file label="FIle (3)" name="upload" /&gt;
+  &lt;s:submit cssClass="btn btn-primary"/&gt;
+&lt;/s:form&gt;</pre>
+</div></div><p><strong>MultipleFileUploadUsingListAction.java</strong></p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">public class MultipleFileUploadUsingListAction extends 
ActionSupport {
+       private List&lt;File&gt; uploads = new ArrayList&lt;File&gt;();
+       private List&lt;String&gt; uploadFileNames = new 
ArrayList&lt;String&gt;();
+       private List&lt;String&gt; uploadContentTypes = new 
ArrayList&lt;String&gt;();
+
+       public List&lt;File&gt; getUpload() {
+               return this.uploads;
+       }
+       public void setUpload(List&lt;File&gt; uploads) {
+               this.uploads = uploads;
+       }
+       public List&lt;String&gt; getUploadFileName() {
+               return this.uploadFileNames;
+       }
+       public void setUploadFileName(List&lt;String&gt; uploadFileNames) {
+               this.uploadFileNames = uploadFileNames;
+       }
+       public List&lt;String&gt; getUploadContentType() {
+               return this.uploadContentTypes;
+       }
+       public void setUploadContentType(List&lt;String&gt; contentTypes) {
+               this.uploadContentTypes = contentTypes;
+       }
+       public String upload() throws Exception {
+               System.out.println("\n\n upload1");
+               System.out.println("files:");
+               for (File u : uploads) {
+                       System.out.println("*** " + u + "\t" + u.length());
+               }
+               System.out.println("filenames:");
+               for (String n : uploadFileNames) {
+                       System.out.println("*** " + n);
+               }
+               System.out.println("content types:");
+               for (String c : uploadContentTypes) {
+                       System.out.println("*** " + c);
+               }
+               System.out.println("\n\n");
+               return SUCCESS;
+       }
+}</pre>
+</div></div><h2 id="FileUpload-AdvancedConfiguration">Advanced 
Configuration</h2><p>The Struts 2 <code>default.properties</code> file defines 
several settings that affect the behavior of file uploading. You may find in 
necessary to change these values. The names and default values are:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: plain; gutter: false; theme: Default" 
style="font-size:12px;">struts.multipart.parser=jakarta
+struts.multipart.saveDir=
+struts.multipart.maxSize=2097152
+</pre>
+</div></div><div class="confluence-information-macro 
confluence-information-macro-note"><span class="aui-icon aui-icon-small 
aui-iconfont-warning confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Please remember that the 
<strong>struts.multipart.maxSize</strong> is the size limit of the whole 
request, which means when you uploading multiple files, the sum of their size 
must be below the 
<strong>struts.multipart.maxSize</strong>!</p></div></div><p>In order to change 
theses settings you define a constant in your applications 
<code>struts.xml</code> file like so:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!DOCTYPE struts PUBLIC 
+       "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" 
+       "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
+&lt;struts&gt;
+    &lt;constant name="struts.multipart.maxSize" value="1000000" /&gt;
+    ...
+&lt;/struts&gt;
+</pre>
+</div></div><p>Additionally the <code>fileUpload</code> interceptor has 
settings that can be put in place for individual action mappings by customizing 
your interceptor stack.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;action name="doUpload" 
class="com.example.UploadAction"&gt;
+    &lt;interceptor-ref name="basicStack"/&gt;
+    &lt;interceptor-ref name="fileUpload"&gt;
+        &lt;param name="allowedTypes"&gt;text/plain&lt;/param&gt;
+    &lt;/interceptor-ref&gt; 
+    &lt;interceptor-ref name="validation"/&gt;
+    &lt;interceptor-ref name="workflow"/&gt;
+
+    &lt;result name="success"&gt;good_result.jsp&lt;/result&gt;
+&lt;/action&gt;
+</pre>
+</div></div><h3 id="FileUpload-FileSizeLimits">File Size Limits</h3><p>There 
are two separate file size limits. First is 
<code>struts.multipart.maxSize</code> which comes from the Struts 2 
<code>default.properties</code> file. This setting exists for security reasons 
to prohibit a malicious user from uploading extremely large files to file up 
your servers disk space. This setting defaults to approximately 2 megabytes and 
should be adjusted to the maximum size file (2 gigs max) that your will need 
the framework to receive. If you are uploading more than one file on a form the 
<code>struts.multipart.maxSize</code> applies to the combined total, not the 
individual file sizes. The other setting, <code>maximumSize</code>, is an 
interceptor setting that is used to ensure a particular Action does not receive 
a file that is too large. Notice the locations of both settings in the 
following example:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent
  pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!DOCTYPE struts PUBLIC 
+       "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" 
+       "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
+&lt;struts&gt;
+    &lt;constant name="struts.multipart.maxSize" value="1000000" /&gt;
+    
+    &lt;action name="doUpload" class="com.example.UploadAction"&gt;
+        &lt;interceptor-ref name="basicStack"/&gt;
+        &lt;interceptor-ref name="fileUpload"&gt;
+            &lt;param name="maximumSize"&gt;500000&lt;/param&gt;
+        &lt;/interceptor-ref&gt; 
+        &lt;interceptor-ref name="validation"/&gt;
+        &lt;interceptor-ref name="workflow"/&gt;
+
+        &lt;result name="success"&gt;good_result.jsp&lt;/result&gt;
+    &lt;/action&gt;
+&lt;/struts&gt;
+</pre>
+</div></div><h3 id="FileUpload-FileTypes">File Types</h3><p>There are two ways 
to limit the uploaded file type, declaratively and programmatically. To 
declaratively limit the file type a comma separated list of allowedTypes can be 
specified as a fileUpload interceptor param as shown in the following 
example:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;action name="doUpload" 
class="com.example.UploadAction"&gt;
+    &lt;interceptor-ref name="basicStack"/&gt;
+    &lt;interceptor-ref name="fileUpload"&gt;
+        &lt;param name="allowedTypes"&gt;image/jpeg,image/gif&lt;/param&gt;
+    &lt;/interceptor-ref&gt; 
+    &lt;interceptor-ref name="validation"/&gt;
+    &lt;interceptor-ref name="workflow"/&gt;
+
+    &lt;result name="success"&gt;good_result.jsp&lt;/result&gt;
+&lt;/action&gt;
+</pre>
+</div></div><p>When the uploaded file type does not match one of the MIME 
types specified a field error will be created as described in the next section 
entitled Error Messages. Programmatically limiting the file type means using 
the information passed in to your Action class via the 
<code>setXContentType(String contentType)</code> method. The benefit to this 
type of approach would be that it's more flexible and no interceptor 
configuration would be needed if file sizes are keep under 2 megs.</p><h3 
id="FileUpload-ErrorMessages">Error Messages</h3><p>If an error occurs several 
field errors will be added assuming that the action implements 
<code>com.opensymphony.xwork2.ValidationAware</code> or extends 
<code>com.opensymphony.xwork2.ActionSupport</code>. These error messages are 
based on several i18n values stored in struts-messages.properties, a default 
i18n file processed for all i18n requests. You can override the text of these 
messages by providing text for the following keys:</p>
 <div class="table-wrap"><table class="confluenceTable"><tbody><tr><th 
colspan="1" rowspan="1" class="confluenceTh"><p>Error Key</p></th><th 
colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>struts.messages.error.uploading</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>A general error that occurs 
when the file could not be uploaded</p></td></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p>struts.messages.error.file.too.large</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Occurs when the uploaded file 
is too large as specified by maximumSize.</p></td></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p>struts.messages.error.content.type.not.allowed</p></td><td
 colspan="1" rowspan="1" class="confluenceTd"><p>Occurs when the uploaded file 
does not match the expected content types specified</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>struts.
 messages.error.file.extension.not.allowed</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Occurs when uploaded file has disallowed 
extension</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>struts.messages.upload.error.SizeLimitExceededException</p></td><td
 colspan="1" rowspan="1" class="confluenceTd"><p>Occurs when the upload request 
(as a whole) exceed configured 
<strong>struts.multipart.maxSize</strong></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>struts.messages.upload.error.&lt;Exception 
class SimpleName&gt;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Occurs when any other exception took place during file 
upload process</p></td></tr></tbody></table></div><h3 
id="FileUpload-TemporaryDirectories">Temporary Directories</h3><p>All uploaded 
files are saved to a temporary directory by the framework before being passed 
in to an Action. Depending on the allowed file sizes it may be necessary to 
have the framework s
 tore these temporary files in an alternate location. To do this change 
<code>struts.multipart.saveDir</code> to the directory where the uploaded files 
will be placed. If this property is not set it defaults to 
<code>javax.servlet.context.tempdir</code>. Keep in mind that on some operating 
systems, like Solaris, <code>/tmp</code> is memory based and files stored in 
that directory would consume an amount of RAM approximately equal to the size 
of the uploaded file.</p><h3 id="FileUpload-AlternateLibraries">Alternate 
Libraries</h3><p>The <code>struts.multipart.parser</code> used by the 
fileUpload interceptor to handle HTTP POST requests, encoded using the 
MIME-type multipart/form-data, can be changed out. Currently there are two 
choices, jakarta and pell. The jakarta parser is a standard part of the Struts 
2 framework needing only its required libraries added to a project. The pell 
parser uses Jason Pell's multipart parser instead of the Commons-FileUpload 
library. The pell parser is a 
 Struts 2 plugin, for more details see: <a shape="rect" 
href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=33353";>pell
 multipart plugin</a>. There was a third alternative, cos, but it was removed 
due to licensing incompatibilities.</p><p>As from Struts version 2.3.18 a new 
implementation of&#160;<code>MultiPartRequest</code> was added 
-&#160;<code>JakartaStreamMultiPartRequest</code>. It can be used to handle 
large files, see&#160;<a shape="rect" class="external-link" 
href="https://issues.apache.org/jira/browse/WW-3025";>WW-3025</a> for more 
details, but you can simple set</p><pre>&lt;constant 
name="struts.multipart.parser" value="jakarta-stream" /&gt;</pre><p>in 
struts.xml to start using it.</p><h3 id="FileUpload-Requestvalidation">Request 
validation</h3><p>The&#160;<code>struts.multipart.validationRegex</code>&#160;is
 used to define a RegEx to be used to validate if the incoming request is a 
multipart request. The request must use the <code>POST</code>&#160;metho
 d and match the RegEx, by default the RegEx is defined as follow:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" 
style="font-size:12px;">^multipart\\/form-data(; 
boundary=[a-zA-Z0-9]{1,70})?</pre>
+</div></div><p>Please read&#160;<a shape="rect" class="external-link" 
href="https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html"; 
rel="nofollow">RFC1341</a> the <strong>Multipart section</strong> for more 
details, existing Struts <code>Multipart</code>&#160;parsers support 
only&#160;<code>multipart/form-data</code>&#160;content type. This option is 
available since Struts 2.3.11.</p><h3 
id="FileUpload-Disablingfileuploadsupport">Disabling file upload 
support</h3><p>You can alternatively disable the whole file upload mechanism 
defining a constant in&#160;<code>struts.xml</code>:</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" 
style="font-size:12px;">&lt;constant name="struts.multipart.enabled" 
value="false"/&gt;</pre>
+</div></div><p>With this constant in place, Struts will ignore 
a&#160;<code>Content-Type</code> header and will treat each request as an 
ordinary http request. This option is available since Struts 
2.3.11.</p><p>&#160;</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/file.html
----------------------------------------------------------------------
diff --git a/content/docs/file.html b/content/docs/file.html
new file mode 100644
index 0000000..af0d06c
--- /dev/null
+++ b/content/docs/file.html
@@ -0,0 +1,169 @@
+<!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='https://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
+    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
+    <script src='https://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' 
type='text/javascript'></script>
+    <script src='https://struts.apache.org/highlighter/js/shBrushCss.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>file</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>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a 
href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a 
href="tag-developers-guide.html">Tag Developers Guide</a>&nbsp;&gt;&nbsp;<a 
href="struts-tags.html">Struts Tags</a>&nbsp;&gt;&nbsp;<a 
href="tag-reference.html">Tag Reference</a>&nbsp;&gt;&nbsp;<a 
href="ui-tag-reference.html">UI Tag Reference</a>&nbsp;&gt;&nbsp;<a 
href="file.html">file</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">file</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14283";>
+                <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=14283";>Edit
 Page</a>
+            &nbsp;
+            <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>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14283";>
+                <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=14283";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14283";>
+                <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=14283";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><div 
class="confluence-information-macro confluence-information-macro-note"><span 
class="aui-icon aui-icon-small aui-iconfont-warning 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Please make sure you have read the 
<a shape="rect" href="tag-syntax.html">Tag Syntax</a> document and understand 
how tag attribute syntax works.</p></div></div>
+
+<h2 id="file-Description">Description</h2>
+
+<p>Renders an HTML file input element.</p>
+
+<h2 id="file-Parameters">Parameters</h2>
+
+<p><table width="100%"><tr><td colspan="6" rowspan="1"><h4>Dynamic Attributes 
Allowed:</h4> true</td></tr><tr><td colspan="6" 
rowspan="1">&#160;</td></tr><tr><th align="left" colspan="1" rowspan="1" 
valign="top"><h4>Name</h4></th><th align="left" colspan="1" rowspan="1" 
valign="top"><h4>Required</h4></th><th align="left" colspan="1" rowspan="1" 
valign="top"><h4>Default</h4></th><th align="left" colspan="1" rowspan="1" 
valign="top"><h4>Evaluated</h4></th><th align="left" colspan="1" rowspan="1" 
valign="top"><h4>Type</h4></th><th align="left" colspan="1" rowspan="1" 
valign="top"><h4>Description</h4></th></tr><tr><td align="left" colspan="1" 
rowspan="1" valign="top">accept</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">HTML acc
 ept attribute to indicate accepted file mimetypes</td></tr><tr><td 
align="left" colspan="1" rowspan="1" valign="top">accesskey</td><td 
align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" 
colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" 
rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html accesskey attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">class</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The css class to use for element - it's an alias of cssClass 
attribute.</td></tr><tr><td align="left" colspan="1" rowsp
 an="1" valign="top">cssClass</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The css class to use for element</td></tr><tr><td align="left" 
colspan="1" rowspan="1" valign="top">cssErrorClass</td><td align="left" 
colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" 
rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The css error class to use for element</td></tr><tr><td 
align="left" colspan="1" rowspan="1" valign="top">cssErrorStyle</td><td 
align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" 
colspan="1" rowspan="1" valig
 n="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The css error style definitions for element to 
use</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">cssStyle</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The css style definitions for element to use</td></tr><tr><td 
align="left" colspan="1" rowspan="1" valign="top">disabled</td><td align="left" 
colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" 
rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top
 ">String</td><td align="left" colspan="1" rowspan="1" valign="top">Set the 
html disabled attribute on rendered html element</td></tr><tr><td align="left" 
colspan="1" rowspan="1" valign="top">errorPosition</td><td align="left" 
colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" 
rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Define error position of form element 
(top|bottom)</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">id</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">HTML id attribute</td></tr><tr><td align="left" col
 span="1" rowspan="1" valign="top">javascriptTooltip</td><td align="left" 
colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" 
rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">Boolean</td><td align="left" colspan="1" rowspan="1" 
valign="top">Use JavaScript to generate tooltips</td></tr><tr><td align="left" 
colspan="1" rowspan="1" valign="top">key</td><td align="left" colspan="1" 
rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the key (name, value, label) for this particular 
component</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">label</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td alig
 n="left" colspan="1" rowspan="1" valign="top"></td><td align="left" 
colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" 
rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Label expression used for rendering an element specific 
label</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">labelSeparator</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">:</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">String that will be appended to the label</td></tr><tr><td 
align="left" colspan="1" rowspan="1" valign="top">labelposition</td><td 
align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" 
colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" 
rowspan="1" valign="top">fals
 e</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td 
align="left" colspan="1" rowspan="1" valign="top">Define label position of form 
element (top/left)</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">name</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The name to set for element</td></tr><tr><td align="left" 
colspan="1" rowspan="1" valign="top">onblur</td><td align="left" colspan="1" 
rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top"> 
Set the html onblur attribut
 e on rendered html element</td></tr><tr><td align="left" colspan="1" 
rowspan="1" valign="top">onchange</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onchange attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onclick</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onclick attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">ondblclick</td><td 
 align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" 
colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" 
rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html ondblclick attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onfocus</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onfocus attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onkeydown</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="t
 op"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td 
align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" 
colspan="1" rowspan="1" valign="top">Set the html onkeydown attribute on 
rendered html element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onkeypress</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onkeypress attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onkeyup</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowsp
 an="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onkeyup attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onmousedown</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onmousedown attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onmousemove</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onmou
 semove attribute on rendered html element</td></tr><tr><td align="left" 
colspan="1" rowspan="1" valign="top">onmouseout</td><td align="left" 
colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" 
rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onmouseout attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onmouseover</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onmouseover attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" valig
 n="top">onmouseup</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onmouseup attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">onselect</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html onselect attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">requiredLabel</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" co
 lspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" 
rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">Boolean</td><td align="left" colspan="1" rowspan="1" 
valign="top">If set to true, the rendered element will indicate that input is 
required</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">requiredPosition</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Define required position of required form element 
(left|right)</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">size</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="
 1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">Integer</td><td align="left" colspan="1" rowspan="1" 
valign="top">HTML size attribute</td></tr><tr><td align="left" colspan="1" 
rowspan="1" valign="top">style</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The css style definitions for element to use - it's an alias of 
cssStyle attribute.</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">tabindex</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" row
 span="1" valign="top">Set the html tabindex attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">template</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The template (other than default) to use for rendering the 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">templateDir</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The template directory.</td></tr><tr><td align="left" colspan="1" 
rowspan="1
 " valign="top">theme</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">The theme (other than default) to use for rendering the 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">title</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the html title attribute on rendered html 
element</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">tooltip</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colsp
 an="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Set the tooltip of this particular component</td></tr><tr><td 
align="left" colspan="1" rowspan="1" valign="top">tooltipConfig</td><td 
align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" 
colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" 
rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Deprecated. Use individual tooltip configuration attributes 
instead.</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">tooltipCssClass</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">StrutsTTClassic</td><td align="left" colspan="1" rowspan="1" valign
 ="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">CSS class applied to JavaScrip tooltips</td></tr><tr><td 
align="left" colspan="1" rowspan="1" valign="top">tooltipDelay</td><td 
align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" 
colspan="1" rowspan="1" valign="top">Classic</td><td align="left" colspan="1" 
rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Delay in milliseconds, before showing JavaScript tooltips 
</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">tooltipIconPath</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="
 1" rowspan="1" valign="top">Icon path used for image that will have the 
tooltip</td></tr><tr><td align="left" colspan="1" rowspan="1" 
valign="top">value</td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top"></td><td align="left" colspan="1" rowspan="1" 
valign="top">false</td><td align="left" colspan="1" rowspan="1" 
valign="top">String</td><td align="left" colspan="1" rowspan="1" 
valign="top">Preset the value of input element.</td></tr></table></p>
+
+<h2 id="file-Examples">Examples</h2>
+
+<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
+&lt;s:file name=&quot;anUploadFile&quot; accept=&quot;text/*&quot; /&gt;
+&lt;s:file name=&quot;anohterUploadFIle&quot; 
accept=&quot;text/html,text/plain&quot; /&gt;
+]]></script>
+</div></div></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/flying-solo.html
----------------------------------------------------------------------
diff --git a/content/docs/flying-solo.html b/content/docs/flying-solo.html
new file mode 100644
index 0000000..54058b2
--- /dev/null
+++ b/content/docs/flying-solo.html
@@ -0,0 +1,146 @@
+<!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>Flying Solo</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>
+            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a 
href="tutorials.html">Tutorials</a>&nbsp;&gt;&nbsp;<a 
href="bootstrap.html">Bootstrap</a>&nbsp;&gt;&nbsp;<a 
href="flying-solo.html">Flying Solo</a>
+        </td>
+        <td align="right" valign="middle" nowrap>
+            <form name="search" action="https://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">Flying 
Solo</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; 
margin: 0px;">
+            <a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=13984";>
+                <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=13984";>Edit
 Page</a>
+            &nbsp;
+            <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>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=13984";>
+                <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=13984";>Add
 Page</a>
+            &nbsp;
+            <a 
href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=13984";>
+                <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=13984";>Add
 News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><p>There are several resources 
available to help you create your own applications, including QuickStart and 
the various example applications.</p>
+
+<h2 id="FlyingSolo-BrowsetheResources">Browse the Resources</h2>
+
+<p>There are online resources to help you along, every step of the way.</p>
+<ul><li><a shape="rect" class="external-link" 
href="http://struts.apache.org/downloads.html";>Download the framework</a> - The 
full distribution includes sample applications, source code, and 
documentation.</li><li><a shape="rect" class="external-link" 
href="http://struts.apache.org/mail.html";>Subscribe to Mailing List</a> and 
post a question, or browse Mail Archive. (You probably want to browse the 
archive or forum first.)</li><li><a shape="rect" class="external-link" 
href="http://svn.apache.org/viewvc/struts/struts2/";>Subversion Repository</a> - 
Browse the source.</li><li><a shape="rect" class="external-link" 
href="http://cwiki.apache.org/confluence/display/WW/Home";>Online 
documentation</a> - Read it here first! The project documentation is maintained 
using Confluence and exported to HTML on every change.</li><li><a shape="rect" 
class="external-link" href="http://issues.apache.org/struts/";>JIRA Issue 
Tracker</a> - Browse or file enhancements requests and defect reports.</li></ul>
+
+
+<h2 id="FlyingSolo-Backto">Back to <a shape="rect" 
href="tutorials.html">Tutorials</a></h2></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

Reply via email to