You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by BugRat Mail System <to...@cortexity.com> on 2000/12/29 15:47:33 UTC

BugRat Report #674 has been filed.

Bug report #674 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com/BugRatViewer/ShowReport/674>

REPORT #674 Details.

Project: Struts
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: non-critical
Confidence: public
Environment: 
   Release: 20001227
   JVM Release: 1.3
   Operating System: any
   OS Release: any
   Platform: any

Synopsis: 
ActionServlet.processLocale() does not create a session, when required.

Description:
Consider the following lines of code in ActionServlet.processLocale():

        if (!locale)
            return;             // Service not requested
        HttpSession session = request.getSession(false);
        if (session == null)
            return;             // Not in a session

Locales require sessions, yet the third line explicitly prevents a session from being created if one does not already exist.  As it turns out, the first time through, no session exists and the method simply returns.

Would it not be the case that, if one chooses to use locales, one is, in fact, accepting sessions as part of the bargain?  Should not the call to getSession() request a session if one does not yet exist? If one doesn't want sessions, one can't have locales.  In that case, simply shut locales off and no session will be created.