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 2016/09/02 05:58:25 UTC

svn commit: r996489 [2/2] - in /websites/production/struts/content/docs: action-configuration.html actionmapper.html interceptors.html migration-guide.html struts-23-to-25-migration.html webxml.html

Added: websites/production/struts/content/docs/struts-23-to-25-migration.html
==============================================================================
--- websites/production/struts/content/docs/struts-23-to-25-migration.html (added)
+++ websites/production/struts/content/docs/struts-23-to-25-migration.html Fri Sep  2 05:58:25 2016
@@ -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='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 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>Struts 2.3 to 2.5 migration</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="migration-guide.html">Migration Guide</a>&nbsp;&gt;&nbsp;<a href="struts-23-to-25-migration.html">Struts 2.3 to 2.5 migration</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">Struts 2.3 to 2.5 migration</div>
+
+        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=65868294">
+                <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=65868294">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=65868294">
+                <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=65868294">Add Page</a>
+            &nbsp;
+            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=65868294">
+                <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=65868294">Add News</a>
+        </div>
+    </div>
+
+    <div class="pagecontent">
+        <div class="wiki-content">
+            <div id="ConfluenceContent"><h3 id="Struts2.3to2.5migration-/*&lt;![CDATA[*/div.rbtoc1472795638836{padding:0px;}div.rbtoc1472795638836ul{list-style:disc;margin-left:0px;}div.rbtoc1472795638836li{margin-left:0px;padding-left:0px;}/*]]&gt;*/#Struts2.3to2.5migration-Dependencies#Struts2.3to2.5migrat"><style type="text/css">/*<![CDATA[*/
+div.rbtoc1472795638836 {padding: 0px;}
+div.rbtoc1472795638836 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1472795638836 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></h3><div class="toc-macro rbtoc1472795638836">
+<ul class="toc-indentation"><li><a shape="rect" href="#Struts2.3to2.5migration-"></a></li><li><a shape="rect" href="#Struts2.3to2.5migration-Dependencies">Dependencies</a></li><li><a shape="rect" href="#Struts2.3to2.5migration-StrutsPrepareAndExecuteFilter">StrutsPrepareAndExecuteFilter</a></li><li><a shape="rect" href="#Struts2.3to2.5migration-DTD">DTD</a></li><li><a shape="rect" href="#Struts2.3to2.5migration-Tagsattributes">Tags attributes</a></li><li><a shape="rect" href="#Struts2.3to2.5migration-Divtag">Div tag</a></li><li><a shape="rect" href="#Struts2.3to2.5migration-Fieldnames">Field names</a></li><li><a shape="rect" href="#Struts2.3to2.5migration-Tiles">Tiles</a></li></ul>
+</div><h3 id="Struts2.3to2.5migration-Dependencies">Dependencies</h3><p>Update Struts dependencies to 2.5.<br clear="none"><br clear="none">Remove the following plugin dependencies because they were dropped and aren't supported anymore.</p><ul><li>Dojo Plugin</li><li>Codebehind Plugin</li><li>JSF Plugin</li><li>Struts1 Plugin</li></ul><h3 id="Struts2.3to2.5migration-StrutsPrepareAndExecuteFilter">StrutsPrepareAndExecuteFilter</h3><p>The&#160;<code>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</code> was moved to <code>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</code>.<br clear="none"><br clear="none">In web.xml replace this:</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;filter&gt;
+    &lt;filter-name&gt;struts2&lt;/filter-name&gt;
+    &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
+&lt;/filter&gt;</pre>
+</div></div><p>with that:</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;filter&gt;
+    &lt;filter-name&gt;struts2&lt;/filter-name&gt;
+    &lt;filter-class&gt;org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
+&lt;/filter&gt;</pre>
+</div></div><p>There were other package changes, please read&#160;<a shape="rect" href="version-notes-25.html">Version Notes 2.5</a> for more details.</p><h3 id="Struts2.3to2.5migration-DTD">DTD</h3><p>Struts DTD was updated to 2.5 version.<br clear="none"><br clear="none">In struts.xml replace 2.3 DTD version:</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;!DOCTYPE struts PUBLIC
+        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
+        "http://struts.apache.org/dtds/struts-2.3.dtd"&gt;</pre>
+</div></div><p>with 2.5:</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;!DOCTYPE struts PUBLIC
+        "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
+        "http://struts.apache.org/dtds/struts-2.5.dtd"&gt;</pre>
+</div></div><h3 id="Struts2.3to2.5migration-Tagsattributes">Tags attributes</h3><p>The&#160;<code>id</code> attribute was replaced with&#160;<code>var</code> attribute in the following tags.</p><ul><li><code>&lt;s:action&gt;</code></li><li><code>&lt;s:append&gt;</code></li><li><code>&lt;s:bean&gt;</code></li><li><code>&lt;s:date&gt;</code></li><li><code>&lt;s:generator&gt;</code></li><li><code>&lt;s:iterator&gt;</code></li><li><code>&lt;s:merge&gt;</code></li><li><code>&lt;s:number&gt;</code></li><li><code>&lt;s:set&gt;</code></li><li><code>&lt;s:sort&gt;</code></li><li><code>&lt;s:subset&gt;</code></li><li><code>&lt;s:text&gt;</code></li><li><code>&lt;s:url&gt;</code></li></ul><p><br clear="none">If you have something like that in your code:&#160;</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:url id="url" action="login"&gt;</pre>
+</div></div><p>change it to:</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:url var="url" action="login"&gt;</pre>
+</div></div><p><br clear="none">The&#160;<code>&lt;s:set&gt;</code> tag&#160;<code>name</code> attribute is replaced with&#160;<code>var</code> attribute.</p><p>From:</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:set id="str1" value="'string1 value'" /&gt;
+&lt;s:set name="str2" value="'string2 value'" /&gt;</pre>
+</div></div><p>to:</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:set var="str1" value="'string1 value'" /&gt;
+&lt;s:set var="str2" value="'string2 value'" /&gt;</pre>
+</div></div><p>Also&#160;<code>escape</code> attribute was renamed to&#160;<code>escapeHtml</code> attribute.</p><p>From:</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:property escape="true" var="someProperty"/&gt;</pre>
+</div></div><p>to:</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:property escapeHtml="true" var="someProperty"/&gt;</pre>
+</div></div><h3 id="Struts2.3to2.5migration-Divtag">Div tag</h3><p>The&#160;<code>&lt;s:div&gt;</code> tag was dropped.<br clear="none"><br clear="none">Replace&#160;<code>&lt;s:div&gt;</code> with plain HTML&#160;<code>&lt;div&gt;</code> tag.</p><h3 id="Struts2.3to2.5migration-Fieldnames">Field names</h3><p>If you have field names which starts with single lower case letter, for example:</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;">private String sTrng;
+public String getSTrng() {...}
+public void setSTrng(String str) {...}</pre>
+</div></div><p><br clear="none">change accessors to&#160;<code>getsTrng</code> and <code>setsTrng</code>.<br clear="none"><br clear="none">Or better yet, change field names to not contain single lower case letter:</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;">private String strng;
+public String getStrng() {...}
+public void setStrng(String str) {...}</pre>
+</div></div><p><br clear="none">For additional info see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/WW-3909">WW-3909</a>.</p><h3 id="Struts2.3to2.5migration-Tiles">Tiles</h3><p>Depending on from which version of struts you upgrade and whether you used <code>tiles-plugin</code> or <code>tiles3-plugin</code> you may need to do different steps.</p><p>Struts 2.5 just provides a <code>tiles-plugin</code> which uses Tiles3. So support for Tiles2 has been dropped as well as the name <code>tiles3-plugin</code>.</p><p>Now the only maven dependency looks like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>maven dependecy for tiles-plugin</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;org.apache.struts&lt;/groupId&gt;
+            &lt;artifactId&gt;struts2-tiles-plugin&lt;/artifactId&gt;
+            &lt;version&gt;${struts2.version}&lt;/version&gt;
+        &lt;/dependency&gt;</pre>
+</div></div><p>&#160;</p><p>You may need to update DTD in your<code> tiles.xml</code> files to Tiles3:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>tiles3 dtd</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"&gt;</pre>
+</div></div><p>&#160;</p><p>A Listener in <code>web.xml</code> is required. It is not necessary to configure paths to <code>tiles.xml</code> files here as they are picked up automatically.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>StrutsTilesListener in web.xml</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;listener&gt;
+  &lt;listener-class&gt;org.apache.struts2.tiles.StrutsTilesListener&lt;/listener-class&gt;
+&lt;/listener&gt;
+
+</pre>
+</div></div><p>&#160;</p><p>Optionally you may remove TilesDefinitions from XML and annotate actions instead. See <a shape="rect" href="tiles-plugin.html">Tiles Plugin</a> for more details.</p><p>&#160;</p><p>&#160;</p></div>
+        </div>
+
+        
+    </div>
+</div>
+<div class="footer">
+    Generated by CXF SiteExporter
+</div>
+</body>
+</html>

Modified: websites/production/struts/content/docs/webxml.html
==============================================================================
--- websites/production/struts/content/docs/webxml.html (original)
+++ websites/production/struts/content/docs/webxml.html Fri Sep  2 05:58:25 2016
@@ -139,16 +139,16 @@ under the License.
     <div class="pagecontent">
         <div class="wiki-content">
             <div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1468563267575 {padding: 0px;}
-div.rbtoc1468563267575 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1468563267575 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1472795637712 {padding: 0px;}
+div.rbtoc1472795637712 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1472795637712 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1468563267575">
+/*]]>*/</style></p><div class="toc-macro rbtoc1472795637712">
 <ul class="toc-indentation"><li><a shape="rect" href="#web.xml-SimpleExample">Simple Example</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#web.xml-ChangedfilterpackageinStruts&gt;=2.5">Changed filter package in Struts &gt;= 2.5</a></li><li><a shape="rect" href="#web.xml-ChangedFilterStructureinStruts&gt;=2.1.3">Changed Filter Structure in Struts &gt;= 2.1.3</a></li><li><a shape="rect" href="#web.xml-ExcludespecificURLs">Exclude specific URLs</a></li></ul>
 </li><li><a shape="rect" href="#web.xml-TaglibExample">Taglib Example</a></li><li><a shape="rect" href="#web.xml-CustomFileManagerandFileManagerFactoryimplementations">Custom FileManager and FileManagerFactory implementations</a></li><li><a shape="rect" href="#web.xml-Customconfigurationprovider">Custom configuration provider</a></li></ul>
-</div><p>The <code>web.xml</code> web application descriptor file represents the core of the Java web application, so it is appropriate that it is also part of the core of the Struts framework. In the <code>web.xml</code> file, Struts defines its FilterDispatcher, the Servlet Filter class that initializes the Struts framework and handles all requests. This filter can contain initialization parameters that affect what, if any, additional configuration files are loaded and how the framework should behave.</p><h1 id="web.xml-SimpleExample">Simple Example</h1><p>Configuring <code>web.xml</code> for the framework is a matter of adding a filter and filter-mapping.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>FilterDispatcher Example (web.xml)</b></div><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;web-app id="MyStrutsApp" version="2.4" 
+</div><p>The <code>web.xml</code> web application descriptor file represents the core of the Java web application, so it is appropriate that it is also part of the core of the Struts framework. In the <code>web.xml</code> file, Struts defines its FilterDispatcher, the Servlet Filter class that initializes the Struts framework and handles all requests. This filter can contain initialization parameters that affect what, if any, additional configuration files are loaded and how the framework should behave.</p><h1 id="web.xml-SimpleExample">Simple Example</h1><p>Configuring <code>web.xml</code> for the framework is a matter of adding a filter and filter-mapping.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Filter Example (web.xml)</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;web-app id="MyStrutsApp" version="2.4" 
 	xmlns="http://java.sun.com/xml/ns/j2ee" 
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
@@ -167,7 +167,7 @@ div.rbtoc1468563267575 li {margin-left:
 
 &lt;/web-app&gt;
 </pre>
-</div></div><h2 id="web.xml-ChangedfilterpackageinStruts&gt;=2.5">Changed filter package in Struts &gt;= 2.5</h2><p><span>As from Struts 2.5 all filters were moved to dedicated package, see the example:</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h2 id="web.xml-ChangedfilterpackageinStruts&gt;=2.5">Changed filter package in Struts &gt;= 2.5</h2><p><span>As from Struts 2.5 all filters were moved to top package, if you are using older version you must use the old package, see example:</span></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;web-app id="WebApp_9" version="2.4" 
 	xmlns="http://java.sun.com/xml/ns/j2ee" 
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
@@ -175,7 +175,7 @@ div.rbtoc1468563267575 li {margin-left:
 
     &lt;filter&gt;
         &lt;filter-name&gt;struts2&lt;/filter-name&gt;
-        &lt;filter-class&gt;org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
+        &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
     ...</pre>
 </div></div><h2 id="web.xml-ChangedFilterStructureinStruts&gt;=2.1.3">Changed Filter Structure in Struts &gt;= 2.1.3</h2><p><span>To split up the the dispatcher phases, FilterDispatcher is deprecated since Struts 2.1.3. If working with older versions, you need to use</span></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;">    ...