myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Nicolucci (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3688) Implement ExternalContext.getSessionId()
Date Tue, 12 Feb 2013 17:31:14 GMT


Paul Nicolucci commented on MYFACES-3688:

Hey Leonardo,

I was looking over this one and it looks like we already have this implemented with one doubt
I have which I'll provide a patch for if you agree.

The JavaDoc says the following:

public String getSessionId(boolean create)

    Return the id of the current session or the empty string if no session has been created
and the create parameter is false.

    Servlet: If create is true, obtain a reference to the HttpSession for the current request
(creating the session if necessary) and return its id. If create is false, obtain a reference
to the current session, if one exists, and return its id. If no session exists, return the
empty string.

        create - Flag indicating whether or not a new session should be created if there is
no session associated with the current request

MyFaces currently in performs the following:

    public String getSessionId(boolean create)
        HttpSession session = ((HttpServletRequest) _servletRequest).getSession(create);
        if (session != null)
            return session.getId();
            return null;

I believe we are already taking care of everything except we are returning 'null' when no
session is available rather than an empty string.

If you agree we need to change this to abide by the specification I'll make the change and
provide a patch.


> Implement ExternalContext.getSessionId()
> ----------------------------------------
>                 Key: MYFACES-3688
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-344
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
> Implement ExternalContext.getSessionId()

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message