Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 66103 invoked from network); 28 Jun 2005 17:20:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jun 2005 17:20:22 -0000 Received: (qmail 52783 invoked by uid 500); 28 Jun 2005 17:20:19 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 52751 invoked by uid 500); 28 Jun 2005 17:20:18 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 52738 invoked by uid 99); 28 Jun 2005 17:20:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jun 2005 10:20:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [62.212.76.62] (HELO server.by008.net) (62.212.76.62) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jun 2005 10:20:17 -0700 Received: from adouma.demon.nl ([82.161.89.203] helo=[127.0.0.1]) by server.by008.net with esmtpa (Exim 4.50) id 1DnJkx-00020h-BI for jetspeed-dev@portals.apache.org; Tue, 28 Jun 2005 19:20:19 +0200 Message-ID: <42C186BE.2060806@douma.nu> Date: Tue, 28 Jun 2005 19:19:58 +0200 From: Ate Douma User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jetspeed Developers List Subject: Re: svn commit: r202098 - in /portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed: pipeline/valve/PageProfilerValve.java profiler/impl/ProfilerValveImpl.java References: <20050627232529.34730.qmail@minotaur.apache.org> <42C161A4.9080209@bluesunrise.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PopBeforeSMTPSenders: ate@douma.nu,linda@douma.nu,lotte@douma.nu X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.by008.net X-AntiAbuse: Original Domain - portals.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - douma.nu X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N James, You are correct: the anonymous session is reused when you login properly. And its actually something you usually want (consider a session based shopping cart). There is a better solution than your workaround though and I will look into it this evening or tomorrow morning. Regards, Ate James Liao wrote: > Hi David, > I test it again thoroghly. But the problem still exist. It seems that > the problem is cause by the following reason: > 1. Each time the JetspeedRequestContext try to get something from > session, it will call HttpServletRequest.getSession(), so there is a > session for guest user. > > 2. When you try to login to portal, LoginServlet will call > "HttpSession session = request.getSession(true);" This does not make > sure to create a new session for this login action. The following is > the Java Doc for this method: > > Returns the current HttpSession associated with this request or, if > if there is no current session and create is true, returns a new > session. > > So it is the same session for the guest and user(admin, manager or > someone else). > > I think we could fix this problem by call > "session.removeAttribute(PageProfilerValve.PROFILE_LOCATORS_PER_PRINCIPAL);" > after "HttpSession session = request.getSession(true);" in > LoginServlet.java. It will clear this attribute. > > My entironment: > JDK 1.4.2_07 > WinXP SP2 > > -James Liao > > On 6/28/05, David Sean Taylor wrote: > >>James Liao wrote: >> >>>Hi david, >>>I have update to the latest J2, I found a problem about your optimize >>>for ProfilerValve. >>> >>>For the first time, I visit J2 portal, I got a guest principal as >>>default, you will getProfileLocators for guest principal and store >>>into session. >>> >>>When I login as admin, the session is still the same session for >>>previous guest, so it will not recreate the locators, still use the >>>old locators for guest. I can't go anywhere except the >>>default-page.psml. I think it is wrong. >>> >> >>Well, IMO logging on should create a new session. >> >>-- >>David Sean Taylor >>Bluesunrise Software >>david@bluesunrise.com >>[office] +01 707 773-4646 >>[mobile] +01 707 529 9194 >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org >>For additional commands, e-mail: jetspeed-dev-help@portals.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org > For additional commands, e-mail: jetspeed-dev-help@portals.apache.org > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org