RequestURL requestURL = new RequestURL("", response.encodeURL(""));
RequestURL requestURL = new RequestURL("",SessionServlet.getSessionEncoding(response));
    private final SessionServlet newSession(HttpServletRequest request,                                            HttpServletResponse response)        throws ServletException    {        try {            logger.fine("new session");            HttpSession session = request.getSession(true);            SessionServlet sessionServlet = new SessionServlet();            // the constructor of SessionServlet associates the Session with the thread            SessionManager.getSession().setServletRequest(request);            SessionManager.getSession().setServletResponse(response);                        /* the request URL is needed already in the setup-phase. Note,             * that at this point, the URL will always be encoded, since             * we (or better: the servlet engine) does not know yet, if setting             * a cookie will be successful (it has to await the response).             * Subsequent requests might decide, _not_ to encode the sessionid             * in the URL (see SessionServlet::doGet())                   -hen             */            RequestURL requestURL = new RequestURL("", response.encodeURL(""));            ((PropertyService)sessionServlet.getSession())                .setProperty("request.url", requestURL);            sessionServlet.setParent(this);            sessionServlet.setExternalizeManager(new ExternalizeManager(response));            sessionServlet.init(servletConfig);            session.setAttribute(lookupName, sessionServlet);            return sessionServlet;        }        catch (Exception e) {            logger.log(Level.SEVERE, null, e);            throw new ServletException(e);        }    }