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 2012/08/22 09:58:39 UTC
svn commit: r1375926 -
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
Author: lukaszlenart
Date: Wed Aug 22 07:58:38 2012
New Revision: 1375926
URL: http://svn.apache.org/viewvc?rev=1375926&view=rev
Log:
WW-3848 adds warning message that the FilterDispatcher is deprecated and can produce errors when used with other web stacks
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java?rev=1375926&r1=1375925&r2=1375926&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java Wed Aug 22 07:58:38 2012
@@ -388,6 +388,8 @@ public class FilterDispatcher implements
*/
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
+ showDeprecatedWarning();
+
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
ServletContext servletContext = getServletContext();
@@ -441,4 +443,21 @@ public class FilterDispatcher implements
devModeOverride.remove();
}
}
+
+ private void showDeprecatedWarning() {
+ String msg =
+ "\n\n" +
+ "***********************************************************************\n" +
+ "* WARNING!!! *\n" +
+ "* *\n" +
+ "* >>> FilterDispatcher <<< is deprecated! Please use the new filters! *\n" +
+ "* *\n" +
+ "* This can be a source of unpredictable problems! *\n" +
+ "* *\n" +
+ "* Please refer to the docs for more details! *\n" +
+ "* http://struts.apache.org/2.x/docs/webxml.html *\n" +
+ "* *\n" +
+ "***********************************************************************\n\n";
+ System.out.println(msg);
+ }
}