struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject RE: REPOST: Locale object in session
Date Thu, 20 Feb 2003 19:02:07 GMT
Well, it won't solve it immediately, that's true. If you're up for it, you can
always grab the source, make the changes yourself, and then rebuild Struts. That
way you'll have a version that works for you while you wait for the bug fix. If
you actually provide a patch with your bug report, it's likely to get fixed much
quicker...

Quoting "Tarek M. Nabil" <Tarek.Nabil@itworx.com>:

> I guess I'll do that then, although it won't solve my problem.
> 
> Thanks Kris
> 
> -----Original Message-----
> From: Kris Schneider [mailto:kris@dotech.com]
> Sent: Thursday, February 20, 2003 7:44 PM
> To: Struts Users Mailing List
> Subject: RE: REPOST: Locale object in session
> 
> 
> Yes, that's in the Struts code base - otherwise it wouldn't be causing you
> any
> problems ;-). The class is org.apache.struts.util.RequestUtils. It seems
> like
> the best thing to do would be to file a bug report:
> 
> http://issues.apache.org/bugzilla/
> 
> Quoting "Tarek M. Nabil" <Tarek.Nabil@itworx.com>:
> 
> > Thanks Kris,
> > 
> > This code snippet, is it from the struts code base? I guess that would
> mean
> > that fixing the problem cannot be done without changing Struts itself?
> > 
> > -----Original Message-----
> > From: Kris Schneider [mailto:kris@dotech.com]
> > Sent: Thursday, February 20, 2003 6:38 PM
> > To: Struts Users Mailing List
> > Subject: RE: REPOST: Locale object in session
> > 
> > 
> > The problem eventually boils down to RequestUtils.retrieveUserLocale
> > blindly
> > calling:
> > 
> > Locale userLocale = (Locale)pageContext.getAttribute(locale,
> > PageContext.SESSION_SCOPE);
> > 
> > Seems like it could check for the existence of a session and use
> > pageContext.getRequest().getLocale() in its absence...
> > 
> > Quoting James Childers <jchilders@hotels.com>:
> > 
> > > I would imagine that some tag inside your JSP is trying to access the
> > > session, but you have session set to false. A stack trace would be
> > helpful,
> > > but unless you have a real good reason I would reconsider your decision
> > not
> > > to use sessions. I am not as familiar with the source as some on this
> > list,
> > > but from my examination of it it makes use of the session object and
> > assumes
> > > that it exists.
> > > 
> > > -= J
> > > 
> > > 
> > > > -----Original Message-----
> > > > From: Tarek M. Nabil [mailto:Tarek.Nabil@itworx.com]
> > > > Sent: Thursday, February 20, 2003 6:23 AM
> > > > To: Struts (E-mail)
> > > > Subject: RE: REPOST: Locale object in session
> > > > 
> > > > Hi everyone,
> > > > 
> > > > Could you please tell me if my question needs more 
> > > > clarificaton, I haven't had a response for it uptil now.
> > > > 
> > > > I appreciate the help.
> > > > 
> > > > Thanks
> > > > 
> > > > -----Original Message-----
> > > > From: Tarek M. Nabil 
> > > > Sent: Tuesday, February 18, 2003 5:08 PM
> > > > To: Struts (E-mail)
> > > > Subject: REPOST: Locale object in session
> > > > 
> > > > 
> > > > Sorry for reposting this message, but I haven't got any responses
> yet.
> > > > 
> > > > -----Original Message-----
> > > > From: Tarek M. Nabil 
> > > > Sent: Sunday, February 16, 2003 11:18 PM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: Locale object in session
> > > > 
> > > > 
> > > > Thanks for the help.
> > > > 
> > > > I still get a "can&#39;t access SESSION_SCOPE without an 
> > > > HttpSession: java.lang.IllegalArgumentException: can't access 
> > > > SESSION_SCOPE without an HttpSession" exception.
> > > > 
> > > > I think the <bean:message> tag is the cause of this 
> > > > exception. I tried looking in the reference, and I cannot 
> > > > find a way of preventing this tag from searching for the 
> > > > Locale object in the session.
> > > > 
> > > > Please help.
> > > > 
> > > > Thanks
> > > > 
> > > > -----Original Message-----
> > > > From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> > > > Sent: Saturday, February 15, 2003 11:57 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Locale object in session
> > > > 
> > > > 
> > > > You'll need to do several things:
> > > > 
> > > > * Set the "locale" servlet init parameter (on the controller servlet)
> > > >   to "false".
> > > > 
> > > > * At the top of each JSP page, be sure to include:
> > > > 
> > > >     <%@ page session="false" %>
> > > > 
> > > >   so that JSP won't create a session for you
> > > > 
> > > > * If you use the <html:html> tag, use a locale="false" attribute
> > > >   there as well.
> > > > 
> > > > Craig
> > > > 
> > > > 
> > > > On Sat, 15 Feb 2003, Tarek M. Nabil wrote:
> > > > 
> > > > > Date: Sat, 15 Feb 2003 21:51:30 +0200
> > > > > From: Tarek M. Nabil <Tarek.Nabil@itworx.com>
> > > > > Reply-To: Struts Users Mailing List
> <struts-user@jakarta.apache.org>
> > > > > To: "Struts (E-mail)" <struts-user@jakarta.apache.org>
> > > > > Subject: Locale object in session
> > > > >
> > > > > Hi everyone,
> > > > >
> > > > > I'm using Struts 1.0.2.
> > > > >
> > > > > I noticed that whenever a new session is created, Struts 
> > > > creates a locale object for that user and stores it in his 
> > > > session. I need to disable session state in my application, 
> > > > so how can I prevent Struts from doing this?
> > > > >
> > > > > Thanks
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > > 
> > 
> > 
> > -- 
> > Kris Schneider <mailto:kris@dotech.com>
> > D.O.Tech       <http://www.dotech.com/>
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > 
> 
> 
> -- 
> Kris Schneider <mailto:kris@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message