FilterRedirector does not initialize sessions. - IS THIS A BUG ?? [fixed?]

ricardo zanini fernandes <[email protected]> Wed, 23 Dec 2009 11:32:06 -0200
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <[email protected]>
Hi guys!

About this thread:
http://www.mail-archive.com/[email protected]/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