[
https://issues.apache.org/jira/browse/MYFACES-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13576802#comment-13576802
]
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.
Parameters:
create - Flag indicating whether or not a new session should be created
if there is no session associated with the current request
Since:
2.2
MyFaces currently in ServletExternalContextImpl.java performs the following:
@Override
public String getSessionId(boolean create)
{
checkHttpServletRequest();
HttpSession session = ((HttpServletRequest)
_servletRequest).getSession(create);
if (session != null)
{
return session.getId();
}
else
{
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.
Thanks!
> Implement ExternalContext.getSessionId()
> ----------------------------------------
>
> Key: MYFACES-3688
> URL: https://issues.apache.org/jira/browse/MYFACES-3688
> 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: http://www.atlassian.com/software/jira