The bean:message tag is trying to find a locale attribute in the session
scope, so it can decide what message bunder to use. 

See also 

http://www.mail-archive.com/[email protected]/msg04095.html


"Esbrook, Scott" wrote:
> 
> In some of my JSPs I've tried setting the page directive <%@ page
> session="false" %> (for performance reasons) but when the JSP includes
> <bean:message> tags this results in the following exception at compilation
> time:
> 
> java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an
> HttpSession
>         at org.apache.jasper.runtime.PageContextImpl.getAttribute(Unknown
> Source)
>         at
> org.apache.struts.util.RequestUtils.message(RequestUtils.java:577)
> 
> I have set the locale attribute to false in the web.xml file for this
> application.
> 
> Browsing through the latest version of RequestUtils.java, it looks like the
> offending line is
> 
>    Locale userLocale = (Locale)pageContext.getAttribute(locale,
> PageContext.SESSION_SCOPE);
> 
> Isn't this wrongfully assuming that there will be a session object to
> retrieve the attribute from?
> 
> Any help/comments greatly appreciated. Thanks,
> 
> Scott Esbrook
> Software Developer
> Compuware Corporation
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Building Java web applications with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to