*/
public void setNewSessionCookie(String sessionId, HttpServletResponse response)
{
if (response != null)
{
Context context = (Context) container_;
Connector connector = ((Response) response).getConnector();
if (context.getCookies())
{
// set a new session cookie
Cookie cookie = new Cookie(Globals.SESSION_COOKIE_NAME, sessionId);
// JBAS-6206. Configure cookie a la o.a.c.connector.Request.configureSessionCookie()
cookie.setMaxAge(-1);
if (context.getSessionCookie().getPath() != null)
{
cookie.setPath(context.getSessionCookie().getPath());
}
else
{
String contextPath = context.getEncodedPath();
if ("".equals(contextPath))
{
contextPath = "/";
}
cookie.setPath(contextPath);
}
if (context.getSessionCookie().getComment() != null)
{
cookie.setComment(context.getSessionCookie().getComment());
}
if (context.getSessionCookie().getDomain() != null)
{
cookie.setDomain(context.getSessionCookie().getDomain());
}
if (context.getSessionCookie().isHttpOnly())
{
cookie.setHttpOnly(true);
}
if (context.getSessionCookie().isSecure())
{
cookie.setSecure(true);
}
if (connector.getSecure())
{