From cactus-user-returnhmason@example.net Wed Dec 23 13:32:59 2009
Return-Path: <cactus-user-returnhmason@example.net>
Delivered-To: hmason@example.net
Received: (qmail 95870 invoked from network); 23 Dec 2009 13:32:59 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 23 Dec 2009 13:32:59 -0000
Received: (qmail 20521 invoked by uid 500); 23 Dec 2009 13:32:59 -0000
Delivered-To: hmason@example.net
Received: (qmail 20478 invoked by uid 500); 23 Dec 2009 13:32:57 -0000
Mailing-List: contact hmason@example.net; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:hmason@example.net>
List-Help: <mailto:hmason@example.net>
List-Post: <mailto:hmason@example.net>
List-Id: "Cactus Users List" <cactus-user.jakarta.apache.org>
Reply-To: "Cactus Users List" <hmason@example.net>
Delivered-To: mailing list hmason@example.net
Received: (qmail 20468 invoked by uid 99); 23 Dec 2009 13:32:57 -0000
Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Dec 2009 13:32:57 +0000
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: domain of hmason@example.net designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO mail-pw0-f54.google.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Dec 2009 13:32:47 +0000
Received: by pwi14 with SMTP id 14so4976120pwi.13
        for <hmason@example.net>; Wed, 23 Dec 2009 05:32:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:from:date:message-id
         :subject:to:content-type;
        bh=rp32JIYQQ8juMJcQcALiNqEuk4Qre5QlIOIt8zZB7iY=;
        b=UQJlDPCfOg5e3vm4EUQg+NOkgl7uDuD8u2JUWiGLJIM0j/CUAsa9EkUkCaDhkv+fFO
         Rwb/pOZnJNYkmKsWIVKRlXZATkNjE7GUBD2uNOBWleF7kcuE+b0+j0E9X44ZvZZZmJ/Z
         aSWA7a19axYQnUdfWfnbFHqT5gwAsrEQ0OMXo=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:from:date:message-id:subject:to:content-type;
        b=En0UAMseuXIVW4jexzsKSqLlnC+VzXKyIRo74SMdizBGo0kn+C8AQZuQRcHoFyw38j
         efv3SOcviSVzfMfH908AwYrCRqsP3uVvQo37EsUJj8UOGrRQGYf3YXT/H9nadNlANgsD
         iCc2MpAfXSfpmyPjW2b5kr3CK+HUW2y4sRySY=
MIME-Version: 1.0
Received: by 83.161.120.155 with SMTP id 16mr1462767wak.20.1261575146159; Wed, 
	23 Dec 2009 05:32:26 -0800 (PST)
From: ricardo zanini fernandes <hmason@example.net>
Date: Wed, 23 Dec 2009 11:32:06 -0200
Message-ID: <hmason@example.net>
Subject: FilterRedirector does not initialize sessions. - IS THIS A BUG ?? 
	[fixed?]
To: hmason@example.net
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Checked: Checked by ClamAV on apache.org

Hi guys!

About this thread:
http://hmason@example.net/msg05948.html

I know it's very old (and sorry for bringing this in xmas eve), but
the implementations on FilterRedirector are already done? I've got a
similar problem discussed in the thread above. Although I implement
the "setAutomaticSession(true)" in the beginXXX methods I can't
retrieve or check if the session is still valid.


TestCase:
------------------
public void beginUserPwdExpired(WebRequest theRequest){
		theRequest.setAutomaticSession(true);
	}
	
	public void testUserPwdExpired() throws IOException, ServletException{
		request.setRemoteUser(USER_PWD_EXPIRED);
		aisFilter.doFilter(request, response, filterChain);
	}
	
	public void endUserPwdExpired(WebResponse theResponse){
		assertEquals(302, theResponse.getStatusCode());
	}
-------------

Filter:
----------------
protected boolean isSessionExpired(HttpServletRequest request){
		if(log.isDebugEnabled())
			log.debug("(....");
			
		boolean sessionExpired = (request.getRequestedSessionId() == null)
									|| !request.isRequestedSessionIdValid();
		
		if(sessionExpired)
			log.warn("(...)");
		
		return sessionExpired;
	}
----------------

The session ID return is always a NULL object. Maybe I'm missing
something here. I've searched at JIRA and the Cactus documentation and
found nothing about it.

Thanks in advance!

--
Ricardo Zanini Fernandes

---------------------------------------------------------------------
To unsubscribe, e-mail: hmason@example.net
For additional commands, e-mail: hmason@example.net



{'source': 'Apache Software Foundation Public Mail Archives'}