Craig R. McClanahan wrote:
>
> This is not the right test for a newly created session, because there
> *was* no requested session. Try something like this instead:
>
> HttpSession session = request.getSession(false);
> if (session == null) {
> ... no session exists ...
> } else if (session.isNew()) {
> ... this is a newly created session ...
> } else {
> ... this is an existing session ...
> }
Hi Craig.
One quick question. What are the semantics of "session.isNew()"?
If I call request.getSession(false), can it fail (return "null")? What would
that mean?
I realize it should return "null" inside a JSP page that had page session
setting turnet to "false", but in general, is there any other occasion?
Nix.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>