You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Pedro Nevado <pn...@javato.com> on 2004/09/14 12:55:46 UTC

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

Hi there,

In the Cactus documentation says that the Redirector proxy " creates an HTTP
Session if the user has expressed the wish (using the
WebRequest.setAutomaticSession(boolean)  code in the beginXXX() method. By
default a session is always created) and the redirector fills by reflection
the session implicit object."

If my understanding of the previous paragraph is correct, the following two
tests should not fail:

............................................................................
...

public class SessionServlet extends HttpServlet {

}

public class SessionServletTest extends ServletTestCase {

    public void beginSessionNull(WebRequest request) {
        request.setAutomaticSession(true);
    }

    public void testSessionNull() {
        SessionServlet sessionServlet = new SessionServlet();
        assertNotNull("There should be a session", session);
    }

}
............................................................................
...

public class SessionFilter {

    private FilterConfig filterConfig;

    public SessionFilter() {
    }

    public void init(FilterConfig filterConfig) {
        this.filterConfig = filterConfig;
    }

    public void doFilter(ServletRequest req, ServletResponse resp,
FilterChain filterChain) throws IOException,
            ServletException {
    }

    public void destroy() {
        this.filterConfig = null;
    }
}

public class SessionFilterTest extends FilterTestCase {

    public void beginSessionNotNull(WebRequest request) {
        request.setAutomaticSession(true);
    }

    public void testSessionNotNull() throws ServletException, IOException{
        HttpSession session = request.getSession(false);
        SessionFilter sessionFilter = new SessionFilter();
        sessionFilter.init(config);
        FilterChain mockFilterChain = new FilterChain() {
            public void doFilter(ServletRequest theRequest, ServletResponse
theResponse) {
            }

            public void init(FilterConfig theConfig) {
            }

            public void destroy() {
            }
        };
        sessionFilter.doFilter(request, response, mockFilterChain);
        assertNotNull("There should be a session", session);
    }
}
............................................................................
...........................

Well, the ServletSessionTest is OK, but the SessionFilterTest fails,
although both of them "have expressed the wish (using the
WebRequest.setAutomaticSession(boolean)  code in the beginXXX() method".

Could anybody tell me if I am overlookin something? I would really
appreciate it.
Regards,

Pedro Nevado



RE: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Kazuhito SUGURI [mailto:suguri.kazuhito@lab.ntt.co.jp]
> Sent: vendredi 12 novembre 2004 06:13
> To: cactus-user@jakarta.apache.org
> Subject: Re: FilterRedirector does not initialize sessions. - IS THIS A
> BUG ??
> 
> Hi Pedro,
> 
> In article <BI...@javato.com>,
> Thu, 11 Nov 2004 18:39:16 +0100,
> "Pedro Nevado" <pn...@javato.com> wrote:
> pnevado> As far as I remember, the problem is not only with the default
> mecanism to
> pnevado> associate a session to the request in the client side. Even if
> you
> pnevado> explicitly set automatic session to true in the client side, this
> statement
> pnevado> is ineffective in the server side.
> 
> Yes. I agree with support setAutomaticSession() for FilterTestCase.
> Only thing I cannot decide is its default behavior.
> 

[snip]

Ok, let's do it in 2 step:
1/ Support setAutomaticSession for FilterTestCase
2/ Decide whether to create a session by default or not (I'd say no for now
unless we have a convincing argument, but we need to document it).

Who wants to do 1/?

Thanks
-Vincent


Re: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Pedro,

In article <BI...@javato.com>,
Thu, 11 Nov 2004 18:39:16 +0100,
"Pedro Nevado" <pn...@javato.com> wrote: 
pnevado> As far as I remember, the problem is not only with the default mecanism to
pnevado> associate a session to the request in the client side. Even if you
pnevado> explicitly set automatic session to true in the client side, this statement
pnevado> is ineffective in the server side.

Yes. I agree with support setAutomaticSession() for FilterTestCase.
Only thing I cannot decide is its default behavior.


pnevado> A midway would be just to patch the code to allow instatiating a session if
pnevado> explicitly said in the webrequest. That way, there would not be, I think,
pnevado> any effect on existing tests wich counts on the present default mecanism.

Fine. I agree with this.

Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp

RE: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Pedro Nevado <pn...@javato.com>.
Hi there,

As far as I remember, the problem is not only with the default mecanism to
associate a session to the request in the client side. Even if you
explicitly set automatic session to true in the client side, this statement
is ineffective in the server side.

In my test with filters I bypass this limitation dealing with the session in
the server side.

A midway would be just to patch the code to allow instatiating a session if
explicitly said in the webrequest. That way, there would not be, I think,
any effect on existing tests wich counts on the present default mecanism.

Please, let me now what you finally conclude about this point.
Regards,

Pedro

-----Mensaje original-----
De: Kazuhito SUGURI [mailto:suguri.kazuhito@lab.ntt.co.jp]
Enviado el: jueves, 11 de noviembre de 2004 17:14
Para: cactus-user@jakarta.apache.org
Asunto: Re: FilterRedirector does not initialize sessions. - IS THIS A
BUG ??


Hi Vincent,

In article <20...@tama5.ecl.ntt.co.jp>,
Thu, 11 Nov 2004 14:03:04 +0100,
"Vincent Massol" <vm...@pivolis.com> wrote:
vmassol> What strategy would you like us to follow to align the behaviors of
vmassol> FilterTestCase and ServletTestCase?

To align...
Is this means that FilterTestCase and ServletTestCase should
have same behavior of its default setAutomateSession()?
If so, I think it's impossible without breaking existing TestCases.
Of cource, it might be more trifling problem than I think.

Why don't we wait for reactions from other users of this list?
# How do you think, Pedro?


vmassol> BTW, do you have any idea why I decided to enable session creation
by
vmassol> default for ServletTestCase? I can't recall... ;-)

I'm not sure since it had already been so when I used Cactus
for the first time. But I can guess some:
1. Servlet uses a session object in many cases, then, it's user friendly
   if the session object is prepared by default.
2. if method under test uses a session object, a TestCase
   'there is no session object available' is needed only once,
   however, there are other many 'when the session object has XYZ'
TestCases.
3. if method under test does not use any session object,
   the default behavior of the session creation can not be a problem.


Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp

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




Re: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Vincent,

In article <20...@tama5.ecl.ntt.co.jp>,
Thu, 11 Nov 2004 14:03:04 +0100,
"Vincent Massol" <vm...@pivolis.com> wrote: 
vmassol> What strategy would you like us to follow to align the behaviors of
vmassol> FilterTestCase and ServletTestCase?

To align...
Is this means that FilterTestCase and ServletTestCase should
have same behavior of its default setAutomateSession()?
If so, I think it's impossible without breaking existing TestCases.
Of cource, it might be more trifling problem than I think.

Why don't we wait for reactions from other users of this list?
# How do you think, Pedro?


vmassol> BTW, do you have any idea why I decided to enable session creation by
vmassol> default for ServletTestCase? I can't recall... ;-)

I'm not sure since it had already been so when I used Cactus
for the first time. But I can guess some:
1. Servlet uses a session object in many cases, then, it's user friendly
   if the session object is prepared by default.
2. if method under test uses a session object, a TestCase 
   'there is no session object available' is needed only once,
   however, there are other many 'when the session object has XYZ' TestCases.
3. if method under test does not use any session object,
   the default behavior of the session creation can not be a problem.


Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp

RE: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Kazuhito SUGURI [mailto:suguri.kazuhito@lab.ntt.co.jp]
> Sent: jeudi 11 novembre 2004 13:52
> To: cactus-user@jakarta.apache.org
> Subject: Re: FilterRedirector does not initialize sessions. - IS THIS A
> BUG ??
> 
> Hi Vincent,
> 
> In article <20...@tama5.ecl.ntt.co.jp>,
> Thu, 11 Nov 2004 12:44:36 +0100,
> "Vincent Massol" <vm...@pivolis.com> wrote:
> vmassol> I'd still suggest we implement the feature to support the
> vmassol> setAutomaticSession() for FilterTestCase but I'm ok to have it of
> by
> vmassol> default.
> 
> OK. That's fine.
> I agree to support setAutomaticSession() for FilterTestCase
> if it does not breaks existing TestCases.
> 
> 
> vmassol> BTW, after looking at the code again, I think this is the default
> vmassol> for Servlets too, so that's ok.
> 
> We need check this.
> org.apache.cactus.internal.WebRequestImpl has isAutomaticSession field
> and its default value is true, at least Cactus-1.6.1.
> I think this value is sent to the server as a parameter
> to control the session creation, and then, session is created by default.

Ah, right. I had just checked the server-side part... 

> 
> 
> vmassol> Don't you agree with Pedro that the following test case should
> pass and that
> vmassol> it is a Cactus bug?
> 
> I think it is a bug of the document rather than of the implementation.
> So it can be an enhancement of Cactus. But, the difference between
> 'enahncement' and 'bug' is not so important for me :-).

What strategy would you like us to follow to align the behaviors of
FilterTestCase and ServletTestCase?

BTW, do you have any idea why I decided to enable session creation by
default for ServletTestCase? I can't recall... ;-)

Thanks
-Vincent


Re: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Vincent,

In article <20...@tama5.ecl.ntt.co.jp>,
Thu, 11 Nov 2004 12:44:36 +0100,
"Vincent Massol" <vm...@pivolis.com> wrote: 
vmassol> I'd still suggest we implement the feature to support the
vmassol> setAutomaticSession() for FilterTestCase but I'm ok to have it of by
vmassol> default.

OK. That's fine.
I agree to support setAutomaticSession() for FilterTestCase
if it does not breaks existing TestCases.


vmassol> BTW, after looking at the code again, I think this is the default
vmassol> for Servlets too, so that's ok.

We need check this.
org.apache.cactus.internal.WebRequestImpl has isAutomaticSession field
and its default value is true, at least Cactus-1.6.1.
I think this value is sent to the server as a parameter
to control the session creation, and then, session is created by default.


vmassol> Don't you agree with Pedro that the following test case should pass and that
vmassol> it is a Cactus bug?

I think it is a bug of the document rather than of the implementation.
So it can be an enhancement of Cactus. But, the difference between
'enahncement' and 'bug' is not so important for me :-).


Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp

RE: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Kazuhito SUGURI [mailto:suguri.kazuhito@lab.ntt.co.jp]
> Sent: jeudi 11 novembre 2004 12:40
> To: cactus-user@jakarta.apache.org
> Subject: Re: FilterRedirector does not initialize sessions. - IS THIS A
> BUG ??
> 
> Hi Vincent,
> 
> In article <20...@tama5.ecl.ntt.co.jp>,
> Thu, 11 Nov 2004 11:02:13 +0100,
> "Vincent Massol" <vm...@pivolis.com> wrote:
> vmassol> Kazuhito, do you agree we should have the same behavior for
> Filters than we
> vmassol> have for Servlets?
> 
> At this moment, I cannot agree with that because
> I think it may have impact to existing FilterTestCases
> as it changes the precondition of testXXX methods.

Yes, you're right it will change preconditions for tests assuming that no
session is created. 

I'd still suggest we implement the feature to support the
setAutomaticSession() for FilterTestCase but I'm ok to have it of by
default. BTW, after looking at the code again, I think this is the default
for Servlets too, so that's ok.

> If someone have testIfSessionNotExists(), for example,
> they have to have beginIfSessionNotExists() which has
> setAutomaticSession(false).
> 
> I think it is enough with change of the document.

Don't you agree with Pedro that the following test case should pass and that
it is a Cactus bug?

public class SessionFilterTest extends FilterTestCase {
        ....
        public void beginSession(WebRequest request) {
            request.setAutomaticSession(true);
        }

        public void testSession() {
            HttpSession session = request.getSession(false);
            assertNotNull("There should be a session", session);
        }
    }

Thanks
-Vincent


Re: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Vincent,

In article <20...@tama5.ecl.ntt.co.jp>,
Thu, 11 Nov 2004 11:02:13 +0100,
"Vincent Massol" <vm...@pivolis.com> wrote: 
vmassol> Kazuhito, do you agree we should have the same behavior for Filters than we
vmassol> have for Servlets?

At this moment, I cannot agree with that because
I think it may have impact to existing FilterTestCases
as it changes the precondition of testXXX methods.
If someone have testIfSessionNotExists(), for example,
they have to have beginIfSessionNotExists() which has
setAutomaticSession(false).

I think it is enough with change of the document.

Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp

RE: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Pedro,

I think you're right in that we should support session creation for Filters
by default (same as for ServletTestCase). 

Kazuhito, do you agree we should have the same behavior for Filters than we
have for Servlets?

Pedro, do you think you could provide a patch for this + associated test
case? If you're ok, the best would be for you to create a JIRA issue and
attach the patch (in diff format please). I think the code has to be
modified in FilterTestCaller (see ServletTestCaller to see how it is done
for the session creation).

Thanks a lot
-Vincent

> -----Original Message-----
> From: Pedro Nevado [mailto:pnevado@javato.com]
> Sent: mercredi 10 novembre 2004 20:34
> To: Cactus Users List
> Subject: RE: FilterRedirector does not initialize sessions. - IS THIS A
> BUG ??
> 
> Yes, that is right. The test you just described fails. I assume also that
> the reason for that is what you state in your e-mail. However I think
> there
> is some possibility of misunderstanding: I designed the test because
> although I was opening a session  with my request wrapper, there was not
> session associated afterwards with my request. Probably, it would be
> enough
> with a few comments in the documentation, which I do not mind at all to
> write.
> 
> Thanks for the answers.
> 
> -----Mensaje original-----
> De: Kazuhito SUGURI [mailto:suguri.kazuhito@lab.ntt.co.jp]
> Enviado el: miercoles, 10 de noviembre de 2004 13:40
> Para: cactus-user@jakarta.apache.org
> Asunto: Re: FilterRedirector does not initialize sessions. - IS THIS A
> BUG ??
> 
> 
> Hi,
> 
> In article <20...@tama5.ecl.ntt.co.jp>,
> Wed, 10 Nov 2004 10:24:49 +0100,
> "Vincent Massol" <vm...@pivolis.com> wrote:
> vmassol> Are you sure your SessionFilter is a real Filter? It looks like
> you're not
> vmassol> extending the Filter interface. The second problem I can see is
> that you're
> vmassol> completely bypassing the filter initialization in your init()
> method (I
> vmassol> think it is safer to call super.init(filterConfig)).
> vmassol>
> vmassol> Have you registered the filter as a filter in the web.xml file?
> 
> I believe, Pedro is expecting that following two tests should be passed:
>     public class SessionServletTest extends ServletTestCase {
>         ....
>         public void beginSession(WebRequest request) {
>             request.setAutomaticSession(true);
>         }
> 
>         public void testSession() {
>             assertNotNull("There should be a session", session);
>         }
>     }
> 
>     public class SessionFilterTest extends FilterTestCase {
>         ....
>         public void beginSession(WebRequest request) {
>             request.setAutomaticSession(true);
>         }
> 
>         public void testSession() {
>             HttpSession session = request.getSession(false);
>             assertNotNull("There should be a session", session);
>         }
>     }
> 
> Am I misunderstanding, Pedro?
> 
> I cannot try it now, but, SessionFilterTest#testSession() may fails.
> An HTTP Session is created to fill the session implicit object
> of ServletTestCase (and of JspTestCase) prior to testXXX.
> However, for FilterTestCase, which doesn't have the session implicit
> object,
> such session creation is not needed and is not implemented, AFAIK.
> 
> Regards,
> ----
> Kazuhito SUGURI
> mailto:suguri.kazuhito@lab.ntt.co.jp
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



RE: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Pedro Nevado <pn...@javato.com>.
Yes, that is right. The test you just described fails. I assume also that
the reason for that is what you state in your e-mail. However I think there
is some possibility of misunderstanding: I designed the test because
although I was opening a session  with my request wrapper, there was not
session associated afterwards with my request. Probably, it would be enough
with a few comments in the documentation, which I do not mind at all to
write.

Thanks for the answers.

-----Mensaje original-----
De: Kazuhito SUGURI [mailto:suguri.kazuhito@lab.ntt.co.jp]
Enviado el: miercoles, 10 de noviembre de 2004 13:40
Para: cactus-user@jakarta.apache.org
Asunto: Re: FilterRedirector does not initialize sessions. - IS THIS A
BUG ??


Hi,

In article <20...@tama5.ecl.ntt.co.jp>,
Wed, 10 Nov 2004 10:24:49 +0100,
"Vincent Massol" <vm...@pivolis.com> wrote:
vmassol> Are you sure your SessionFilter is a real Filter? It looks like
you're not
vmassol> extending the Filter interface. The second problem I can see is
that you're
vmassol> completely bypassing the filter initialization in your init()
method (I
vmassol> think it is safer to call super.init(filterConfig)).
vmassol>
vmassol> Have you registered the filter as a filter in the web.xml file?

I believe, Pedro is expecting that following two tests should be passed:
    public class SessionServletTest extends ServletTestCase {
        ....
        public void beginSession(WebRequest request) {
            request.setAutomaticSession(true);
        }

        public void testSession() {
            assertNotNull("There should be a session", session);
        }
    }

    public class SessionFilterTest extends FilterTestCase {
        ....
        public void beginSession(WebRequest request) {
            request.setAutomaticSession(true);
        }

        public void testSession() {
            HttpSession session = request.getSession(false);
            assertNotNull("There should be a session", session);
        }
    }

Am I misunderstanding, Pedro?

I cannot try it now, but, SessionFilterTest#testSession() may fails.
An HTTP Session is created to fill the session implicit object
of ServletTestCase (and of JspTestCase) prior to testXXX.
However, for FilterTestCase, which doesn't have the session implicit object,
such session creation is not needed and is not implemented, AFAIK.

Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp

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




Re: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi,

In article <20...@tama5.ecl.ntt.co.jp>,
Wed, 10 Nov 2004 10:24:49 +0100,
"Vincent Massol" <vm...@pivolis.com> wrote: 
vmassol> Are you sure your SessionFilter is a real Filter? It looks like you're not
vmassol> extending the Filter interface. The second problem I can see is that you're
vmassol> completely bypassing the filter initialization in your init() method (I
vmassol> think it is safer to call super.init(filterConfig)).
vmassol> 
vmassol> Have you registered the filter as a filter in the web.xml file?

I believe, Pedro is expecting that following two tests should be passed:
    public class SessionServletTest extends ServletTestCase {
        ....
        public void beginSession(WebRequest request) {
            request.setAutomaticSession(true);
        }

        public void testSession() {
            assertNotNull("There should be a session", session);
        }
    }

    public class SessionFilterTest extends FilterTestCase {
        ....
        public void beginSession(WebRequest request) {
            request.setAutomaticSession(true);
        }

        public void testSession() {
            HttpSession session = request.getSession(false);
            assertNotNull("There should be a session", session);
        }
    }

Am I misunderstanding, Pedro?

I cannot try it now, but, SessionFilterTest#testSession() may fails.
An HTTP Session is created to fill the session implicit object
of ServletTestCase (and of JspTestCase) prior to testXXX.
However, for FilterTestCase, which doesn't have the session implicit object,
such session creation is not needed and is not implemented, AFAIK.

Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp

RE: FilterRedirector does not initialize sessions. - IS THIS A BUG ??

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Pedro,

Are you sure your SessionFilter is a real Filter? It looks like you're not
extending the Filter interface. The second problem I can see is that you're
completely bypassing the filter initialization in your init() method (I
think it is safer to call super.init(filterConfig)).

Have you registered the filter as a filter in the web.xml file?

Thanks
-Vincent

> -----Original Message-----
> From: Pedro Nevado [mailto:pnevado@javato.com]
> Sent: mardi 14 septembre 2004 12:56
> To: cactus-user@jakarta.apache.org
> Subject: FilterRedirector does not initialize sessions. - IS THIS A BUG ??
> 
> Hi there,
> 
> In the Cactus documentation says that the Redirector proxy " creates an
> HTTP
> Session if the user has expressed the wish (using the
> WebRequest.setAutomaticSession(boolean)  code in the beginXXX()  method.By
> default a session is always created) and the redirector fills by
> reflection
> the session implicit object."
> 
> If my understanding of the previous paragraph is correct, the following
> two
> tests should not fail:
> 
> ..........................................................................
> ..
> ...
> 
> public class SessionServlet extends HttpServlet {
> 
> }
> 
> public class SessionServletTest extends ServletTestCase {
> 
>     public void beginSessionNull(WebRequest request) {
>         request.setAutomaticSession(true);
>     }
> 
>     public void testSessionNull() {
>         SessionServlet sessionServlet = new SessionServlet();
>         assertNotNull("There should be a session", session);
>     }
> 
> }
> ..........................................................................
> ..
> ...
> 
> public class SessionFilter {
> 
>     private FilterConfig filterConfig;
> 
>     public SessionFilter() {
>     }
> 
>     public void init(FilterConfig filterConfig) {
>         this.filterConfig = filterConfig;
>     }
> 
>     public void doFilter(ServletRequest req, ServletResponse resp,
> FilterChain filterChain) throws IOException,
>             ServletException {
>     }
> 
>     public void destroy() {
>         this.filterConfig = null;
>     }
> }
> 
> public class SessionFilterTest extends FilterTestCase {
> 
>     public void beginSessionNotNull(WebRequest request) {
>         request.setAutomaticSession(true);
>     }
> 
>     public void testSessionNotNull() throws ServletException, IOException{
>         HttpSession session = request.getSession(false);
>         SessionFilter sessionFilter = new SessionFilter();
>         sessionFilter.init(config);
>         FilterChain mockFilterChain = new FilterChain() {
>             public void doFilter(ServletRequest theRequest,
> ServletResponse
> theResponse) {
>             }
> 
>             public void init(FilterConfig theConfig) {
>             }
> 
>             public void destroy() {
>             }
>         };
>         sessionFilter.doFilter(request, response, mockFilterChain);
>         assertNotNull("There should be a session", session);
>     }
> }
> ..........................................................................
> ..
> ...........................
> 
> Well, the ServletSessionTest is OK, but the SessionFilterTest fails,
> although both of them "have expressed the wish (using the
> WebRequest.setAutomaticSession(boolean)  code in the beginXX    Xmethod.
> 
> Could anybody tell me if I am overlookin something? I would really
> appreciate it.
> Regards,
> 
> Pedro Nevado
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org