Thanks for catching that. I just committed a new filter and mapping.

- Dave



On 10/24/06, Allen Gilliland <[EMAIL PROTECTED]> wrote:
Dave,

I think you need to take the code that was deleted from the
CharEncodingFilter and actually move it somewhere else, not just delete
it.  I believe that code is still used by our struts actions, so it's
not really obsolete, it just doesn't need to be applied to all requests
like it was.  I think we had talked about moving it to a new filter
which which was only mapped to /roller-ui/*

-- Allen


[EMAIL PROTECTED] wrote:
> Author: snoopdave
> Date: Mon Oct 23 14:05:27 2006
> New Revision: 467126
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=467126
> Log:
> ROL-1281: fixes to avoid unnecessary session creation
>
> Modified:
>     
incubator/roller/trunk/src/org/apache/roller/ui/core/filters/CharEncodingFilter.java
>     
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
>     
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java
>     
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java
>
> Modified: 
incubator/roller/trunk/src/org/apache/roller/ui/core/filters/CharEncodingFilter.java
> URL: 
http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/core/filters/CharEncodingFilter.java?view=diff&rev=467126&r1=467125&r2=467126
> ==============================================================================
> --- 
incubator/roller/trunk/src/org/apache/roller/ui/core/filters/CharEncodingFilter.java
 (original)
> +++ 
incubator/roller/trunk/src/org/apache/roller/ui/core/filters/CharEncodingFilter.java
 Mon Oct 23 14:05:27 2006
> @@ -84,23 +84,6 @@
>              throw new ServletException("Can't set incoming encoding to 
UTF-8");
>          }
>
> -        // Keep JSTL and Struts Locale's in sync
> -        // NOTE: The session here will get created if it is not present.  
This code was taken from its
> -        // earlier incarnation in RequestFilter, which also caused the 
session to be created.
> -        HttpSession session = ((HttpServletRequest) req).getSession();
> -        if (mLogger.isDebugEnabled()) mLogger.debug("Synchronizing JSTL and 
Struts locales");
> -        Locale locale = (Locale) session.getAttribute(Globals.LOCALE_KEY);
> -        if (locale == null)
> -        {
> -            locale = req.getLocale();
> -        }
> -        if (req.getParameter("locale") != null)
> -        {
> -            locale = new Locale(req.getParameter("locale"));
> -        }
> -        session.setAttribute(Globals.LOCALE_KEY, locale);
> -        Config.set(session, Config.FMT_LOCALE, locale);
> -
>          chain.doFilter(req, res);
>      }
>
>
> Modified: 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
> URL: 
http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java?view=diff&rev=467126&r1=467125&r2=467126
> ==============================================================================
> --- 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
 (original)
> +++ 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
 Mon Oct 23 14:05:27 2006
> @@ -320,7 +320,7 @@
>          HashMap model = new HashMap();
>          try {
>              PageContext pageContext = 
JspFactory.getDefaultFactory().getPageContext(
> -                    this, request, response,"", true, 8192, true);
> +                    this, request, response,"", false, 8192, true);
>
>              // special hack for menu tag
>              request.setAttribute("pageRequest", pageRequest);
>
> Modified: 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java
> URL: 
http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java?view=diff&rev=467126&r1=467125&r2=467126
> ==============================================================================
> --- 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java
 (original)
> +++ 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java
 Mon Oct 23 14:05:27 2006
> @@ -149,7 +149,7 @@
>          Map model = new HashMap();
>          try {
>              PageContext pageContext = 
JspFactory.getDefaultFactory().getPageContext(
> -                    this, request, response,"", true, 8192, true);
> +                    this, request, response,"", false, 8192, true);
>
>              // special hack for menu tag
>              request.setAttribute("pageRequest", previewRequest);
>
> Modified: 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java
> URL: 
http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java?view=diff&rev=467126&r1=467125&r2=467126
> ==============================================================================
> --- 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java
 (original)
> +++ 
incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java
 Mon Oct 23 14:05:27 2006
> @@ -114,7 +114,7 @@
>          Map model = new HashMap();
>          try {
>              PageContext pageContext = 
JspFactory.getDefaultFactory().getPageContext(
> -                    this, request, response,"", true, 8192, true);
> +                    this, request, response,"", false, 8192, true);
>
>              // populate the rendering model
>              Map initData = new HashMap();
>
>

Reply via email to