Author: rich
Date: Fri Apr 29 00:04:38 2005
New Revision: 165270
URL: http://svn.apache.org/viewcvs?rev=165270&view=rev
Log:
Fixes for:
- http://issues.apache.org/jira/browse/BEEHIVE-579 : PfExceptions coreWeb
BVT test fails with struts1.1
- http://issues.apache.org/jira/browse/BEEHIVE-580 : SharedFlowMessageKeys
coreWeb BVT test fails with struts1.1
Also:
- Added a "build.verify.struts11" target in netui/ant. This verifies that
Struts-dependent modules can build against Struts 1.1.
- Removed Struts dependencies from the util module.
- Removed unused StrutsLogFactory/StrutsLogger classes.
- Fixed path "struts11.dependency.path" to point to Struts 1.1, and added
"struts12.dependency.path", which points to Struts 1.2.
tests: bvt in netui, bvt.struts11 in test/webapps/drt (WinXP)
BB: self (linux)
Removed:
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/logging/StrutsLogFactory.java
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/logging/StrutsLogger.java
Modified:
incubator/beehive/trunk/netui/ant/build.xml
incubator/beehive/trunk/netui/ant/netui.properties
incubator/beehive/trunk/netui/netui-imports.xml
incubator/beehive/trunk/netui/src/pageflow/build.xml
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowExceptionHandler.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java
incubator/beehive/trunk/netui/src/scoping/build.xml
incubator/beehive/trunk/netui/src/tags-databinding/build.xml
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java
incubator/beehive/trunk/netui/src/tags-html/build.xml
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractClassicTag.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractSimpleTag.java
incubator/beehive/trunk/netui/src/tags-template/build.xml
incubator/beehive/trunk/netui/src/util/build.xml
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/internal/ServletUtils.java
Modified: incubator/beehive/trunk/netui/ant/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/ant/build.xml?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/ant/build.xml (original)
+++ incubator/beehive/trunk/netui/ant/build.xml Fri Apr 29 00:04:38 2005
@@ -63,6 +63,24 @@
<mkdir dir="${classes.dir}"/>
</target>
+ <target name="build.verify.struts11" description="Build Struts-dependent
modules against Struts 1.1">
+ <subant target="build">
+ <property name="struts.dependency.path.ref"
value="struts11.dependency.path"/>
+ <filelist dir="${src.dir}">
+ <file name="bootstrap"/>
+ <file name="scoping"/>
+ <file name="tomcat-common"/>
+ <file name="tomcat-server"/>
+ <file name="util"/>
+ <file name="pageflow"/>
+ <file name="tomcat-webapp"/>
+ <file name="tags-html"/>
+ <file name="tags-databinding"/>
+ <file name="tags-template"/>
+ </filelist>
+ </subant>
+ </target>
+
<target name="do.subant">
<subant target="${target.name}">
<filelist dir="${src.dir}">
Modified: incubator/beehive/trunk/netui/ant/netui.properties
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/ant/netui.properties?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/ant/netui.properties (original)
+++ incubator/beehive/trunk/netui/ant/netui.properties Fri Apr 29 00:04:38 2005
@@ -29,6 +29,8 @@
#
---------------------------------------------------------------------------------
struts.dir=${netui.home}/external/struts
+struts11.dir=${struts.dir}/legacy/jakarta-struts-1.1-lib
+struts12.dir=${struts.dir}
jsf.dir=${netui.home}/external/jsf/myfaces-1.0.7
tomcat.lib.dir=${netui.home}/external/tomcat
Modified: incubator/beehive/trunk/netui/netui-imports.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/netui-imports.xml?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/netui-imports.xml (original)
+++ incubator/beehive/trunk/netui/netui-imports.xml Fri Apr 29 00:04:38 2005
@@ -19,9 +19,17 @@
<patternset refid="jstl.jars"/>
</fileset>
+ <property name="struts.dependency.path.ref"
value="struts12.dependency.path"/>
+
<!-- <path> structures used by clients needing to reference sets of
related JARs -->
<path id="struts11.dependency.path">
- <fileset dir="${struts.dir}">
+ <fileset dir="${struts11.dir}">
+ <patternset refid="struts11.jars"/>
+ </fileset>
+ </path>
+
+ <path id="struts12.dependency.path">
+ <fileset dir="${struts12.dir}">
<patternset refid="struts12.jars"/>
</fileset>
</path>
Modified: incubator/beehive/trunk/netui/src/pageflow/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/build.xml?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/build.xml (original)
+++ incubator/beehive/trunk/netui/src/pageflow/build.xml Fri Apr 29 00:04:38
2005
@@ -15,7 +15,7 @@
<path refid="xbean.dependency.path"/>
<path refid="log4j.dependency.path"/>
<path refid="controls.dependency.path"/>
- <path refid="struts11.dependency.path"/>
+ <path refid="${struts.dependency.path.ref}"/>
<path refid="jsf.dependency.path"/>
<path refid="commons-discovery.dependency.path"/>
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java
Fri Apr 29 00:04:38 2005
@@ -91,9 +91,6 @@
return false;
}
- /**
- * Get the non-secure server listen port. This default implementation
simply returns the current server port.
- */
public int getListenPort( HttpServletRequest request )
{
return -1;
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
Fri Apr 29 00:04:38 2005
@@ -45,6 +45,8 @@
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.PageContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@@ -54,6 +56,7 @@
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
+import java.util.Locale;
@@ -1205,5 +1208,25 @@
}
return bundleName;
+ }
+
+ public static Locale lookupLocale(JspContext jspContext) {
+ assert jspContext instanceof PageContext : "Found JspContext of type
\"" + (jspContext != null ? jspContext.getClass().getName() : "null") + "\"";
+ return lookupLocale(((PageContext)jspContext).getRequest());
+ }
+
+ public static Locale lookupLocale(ServletRequest request) {
+ assert request instanceof HttpServletRequest : "Found servlet request
of type \"" + (request != null ? request.getClass().getName() : "null") + "\"";
+
+ Locale locale = null;
+ HttpServletRequest httpServletRequest = (HttpServletRequest)request;
+ HttpSession session = httpServletRequest.getSession(false);
+ if(session != null)
+ locale = (Locale)session.getAttribute(Globals.LOCALE_KEY);
+
+ if(locale == null)
+ locale = request.getLocale();
+
+ return locale;
}
}
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowExceptionHandler.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowExceptionHandler.java?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowExceptionHandler.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowExceptionHandler.java
Fri Apr 29 00:04:38 2005
@@ -22,11 +22,13 @@
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
import org.apache.struts.config.ExceptionConfig;
import org.apache.struts.util.ModuleException;
import org.apache.struts.Globals;
import org.apache.beehive.netui.pageflow.ExpressionMessage;
import org.apache.beehive.netui.pageflow.config.PageFlowExceptionConfig;
+import org.apache.beehive.netui.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -35,6 +37,8 @@
public class PageFlowExceptionHandler
extends ExceptionHandler
{
+ private static final Logger _log = Logger.getInstance(
PageFlowExceptionHandler.class );
+
public ActionForward execute( Exception ex, ExceptionConfig ae,
ActionMapping mapping, ActionForm formInstance,
HttpServletRequest request,
HttpServletResponse response )
throws ServletException
@@ -50,7 +54,7 @@
// Figure out the error
if ( ex instanceof ModuleException )
{
- error = ( ( ModuleException ) ex ).getActionMessage();
+ error = ( ( ModuleException ) ex ).getError();
property = ( ( ModuleException ) ex ).getProperty();
}
else
@@ -68,12 +72,30 @@
property = ae.getKey();
}
- logException( ex );
+ if ( _log.isDebugEnabled() ) _log.debug( "Handling exception", ex );
// Store the exception
request.setAttribute( Globals.EXCEPTION_KEY, ex );
storeException( request, property, error, forward, ae.getScope() );
return forward;
+ }
+
+ // TODO: this does nothing different than the Struts 1.2 version of the
same method. Remove this when we don't
+ // support Struts 1.1 anymore (or when Struts 1.1 support goes into a
legacy version).
+ protected void storeException( HttpServletRequest request, String
property, ActionMessage error,
+ ActionForward forward, String scope )
+ {
+ ActionMessages errors = new ActionMessages();
+ errors.add( property, error );
+
+ if ( "request".equals( scope ) )
+ {
+ request.setAttribute( Globals.ERROR_KEY, errors );
+ }
+ else
+ {
+ request.getSession().setAttribute( Globals.ERROR_KEY, errors );
+ }
}
}
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java
Fri Apr 29 00:04:38 2005
@@ -39,6 +39,7 @@
import org.apache.beehive.netui.script.common.bundle.BundleNode;
import org.apache.beehive.netui.script.common.bundle.BundleNodeFactory;
import org.apache.beehive.netui.util.logging.Logger;
+import org.apache.beehive.netui.pageflow.internal.InternalUtils;
/**
* Provide a [EMAIL PROTECTED] java.util.Map} of [EMAIL PROTECTED]
org.apache.beehive.netui.script.common.BundleMap.BundleNodeMap} objects that can
@@ -88,7 +89,7 @@
if(LOGGER.isInfoEnabled() && _registeredBundles.containsKey(name))
LOGGER.info("The bundle map already contains a key \"" + name +
"\" overwriting the previous value.");
- Locale locale = forcedLocale != null ? forcedLocale :
ServletUtils.lookupLocale(_servletRequest);
+ Locale locale = forcedLocale != null ? forcedLocale :
InternalUtils.lookupLocale(_servletRequest);
ResourceBundle resourceBundle = ResourceBundle.getBundle(resourcePath,
locale);
BundleNode bundle =
BundleNodeFactory.getInstance().getResourceBundleNode(name, resourceBundle,
locale);
_registeredBundles.put(name, bundle);
@@ -312,7 +313,7 @@
* @return the [EMAIL PROTECTED] java.util.Locale} to use when looking-up
strings while data binding to resource bundles
*/
private final Locale retrieveUserLocale() {
- return ServletUtils.lookupLocale(_servletRequest);
+ return InternalUtils.lookupLocale(_servletRequest);
}
final class BundleNodeEntry
Modified: incubator/beehive/trunk/netui/src/scoping/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/scoping/build.xml?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/scoping/build.xml (original)
+++ incubator/beehive/trunk/netui/src/scoping/build.xml Fri Apr 29 00:04:38 2005
@@ -10,7 +10,6 @@
<path id="module.classpath">
<path refid="servlet.dependency.path"/>
<path refid="log4j.dependency.path"/>
- <path refid="struts11.dependency.path"/>
<path refid="commons-codec.dependency.path"/>
</path>
Modified: incubator/beehive/trunk/netui/src/tags-databinding/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/build.xml?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-databinding/build.xml (original)
+++ incubator/beehive/trunk/netui/src/tags-databinding/build.xml Fri Apr 29
00:04:38 2005
@@ -11,7 +11,7 @@
<path refid="servlet.dependency.path"/>
<path refid="xbean.dependency.path"/>
<path refid="log4j.dependency.path"/>
- <path refid="struts11.dependency.path"/>
+ <path refid="${struts.dependency.path.ref}"/>
<pathelement path="${classes.dir}/util"/>
<pathelement path="${classes.dir}/tags-html"/>
<pathelement path="${classes.dir}/pageflow"/>
Modified:
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java
Fri Apr 29 00:04:38 2005
@@ -29,6 +29,7 @@
import org.apache.struts.Globals;
import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
+import org.apache.beehive.netui.pageflow.internal.InternalUtils;
import org.apache.beehive.netui.tags.internal.PageFlowTagUtils;
import org.apache.beehive.netui.util.Bundle;
import org.apache.beehive.netui.util.internal.ServletUtils;
@@ -78,6 +79,6 @@
}
public static final Locale getLocale(JspContext jspContext) {
- return ServletUtils.lookupLocale(jspContext);
+ return InternalUtils.lookupLocale(jspContext);
}
}
Modified: incubator/beehive/trunk/netui/src/tags-html/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/build.xml?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/build.xml (original)
+++ incubator/beehive/trunk/netui/src/tags-html/build.xml Fri Apr 29 00:04:38
2005
@@ -10,7 +10,7 @@
<path refid="servlet.dependency.path"/>
<path refid="xbean.dependency.path"/>
<path refid="log4j.dependency.path"/>
- <path refid="struts11.dependency.path"/>
+ <path refid="${struts.dependency.path.ref}"/>
<pathelement path="${classes.dir}/util"/>
<pathelement path="${classes.dir}/tags-html"/>
<pathelement path="${classes.dir}/pageflow"/>
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractClassicTag.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractClassicTag.java?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractClassicTag.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractClassicTag.java
Fri Apr 29 00:04:38 2005
@@ -29,6 +29,7 @@
import org.apache.beehive.netui.tags.naming.IndexedNameInterceptor;
import org.apache.beehive.netui.util.Bundle;
import org.apache.beehive.netui.util.logging.Logger;
+import org.apache.beehive.netui.pageflow.internal.InternalUtils;
import org.apache.struts.Globals;
import org.apache.struts.util.RequestUtils;
@@ -127,7 +128,7 @@
*/
protected Locale getUserLocale()
{
- return ServletUtils.lookupLocale(pageContext.getRequest());
+ return InternalUtils.lookupLocale(pageContext.getRequest());
}
/**
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractSimpleTag.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractSimpleTag.java?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractSimpleTag.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractSimpleTag.java
Fri Apr 29 00:04:38 2005
@@ -10,6 +10,7 @@
import org.apache.beehive.netui.util.Bundle;
import org.apache.beehive.netui.util.logging.Logger;
import org.apache.beehive.netui.core.urls.URLRewriterService;
+import org.apache.beehive.netui.pageflow.internal.InternalUtils;
import org.apache.struts.Globals;
import org.apache.struts.util.RequestUtils;
@@ -100,7 +101,7 @@
* @return the Locale object to use when rendering this tag
*/
protected Locale getUserLocale() {
- return ServletUtils.lookupLocale(getJspContext());
+ return InternalUtils.lookupLocale(getJspContext());
}
/**
Modified: incubator/beehive/trunk/netui/src/tags-template/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-template/build.xml?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-template/build.xml (original)
+++ incubator/beehive/trunk/netui/src/tags-template/build.xml Fri Apr 29
00:04:38 2005
@@ -10,7 +10,7 @@
<path refid="servlet.dependency.path"/>
<path refid="xbean.dependency.path"/>
<path refid="log4j.dependency.path"/>
- <path refid="struts11.dependency.path"/>
+ <path refid="${struts.dependency.path.ref}"/>
<pathelement path="${classes.dir}/util"/>
<pathelement path="${classes.dir}/pageflow"/>
<pathelement path="${classes.dir}/tags-html"/>
Modified: incubator/beehive/trunk/netui/src/util/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/util/build.xml?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/src/util/build.xml (original)
+++ incubator/beehive/trunk/netui/src/util/build.xml Fri Apr 29 00:04:38 2005
@@ -13,7 +13,7 @@
<path refid="xbean.dependency.path"/>
<path refid="log4j.dependency.path"/>
<path refid="commons-codec.dependency.path"/>
- <path refid="struts11.dependency.path"/>
+ <path refid="commons-logging.dependency.path"/>
<pathelement path="${build.lib.dir}/beehive-netui-scoping.jar"/>
</path>
Modified:
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/internal/ServletUtils.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/internal/ServletUtils.java?rev=165270&r1=165269&r2=165270&view=diff
==============================================================================
---
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/internal/ServletUtils.java
(original)
+++
incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/internal/ServletUtils.java
Fri Apr 29 00:04:38 2005
@@ -23,13 +23,8 @@
import javax.servlet.ServletContext;
import javax.servlet.ServletResponse;
import javax.servlet.ServletRequest;
-import javax.servlet.jsp.PageContext;
-import javax.servlet.jsp.JspContext;
import java.io.PrintStream;
import java.util.Enumeration;
-import java.util.Locale;
-
-import org.apache.struts.Globals;
public class ServletUtils
{
@@ -149,25 +144,5 @@
assert uri.length() > 1 : uri;
assert lastSlash < uri.length() - 1 : "URI must not end with a slash:
" + uri;
return uri.substring( 0, lastSlash );
- }
-
- public static Locale lookupLocale(JspContext jspContext) {
- assert jspContext instanceof PageContext : "Found JspContext of type
\"" + (jspContext != null ? jspContext.getClass().getName() : "null") + "\"";
- return lookupLocale(((PageContext)jspContext).getRequest());
- }
-
- public static Locale lookupLocale(ServletRequest request) {
- assert request instanceof HttpServletRequest : "Found servlet request
of type \"" + (request != null ? request.getClass().getName() : "null") + "\"";
-
- Locale locale = null;
- HttpServletRequest httpServletRequest = (HttpServletRequest)request;
- HttpSession session = httpServletRequest.getSession(false);
- if(session != null)
- locale = (Locale)session.getAttribute(Globals.LOCALE_KEY);
-
- if(locale == null)
- locale = request.getLocale();
-
- return locale;
}
}