session.init(request);
session.init(config, request);
    public final void init(ServletConfig config,                           HttpServletRequest request,                           HttpServletResponse response) throws ServletException {        try {            initErrorTemplate(config);            session = new Session();            SessionManager.setSession(session);            // set request.url in session, if used in constructor of wings main classs            if (request.isRequestedSessionIdValid()) {                // this will fire an event, if the encoding has changed ..                ((PropertyService) session).setProperty("request.url",                        new RequestURL("", getSessionEncoding(response)));            }            session.init(request);            try {                String mainClassName = config.getInitParameter("wings.mainclass");                Class mainClass = null;                try {                    mainClass = Class.forName(mainClassName, true,                            Thread.currentThread()                            .getContextClassLoader());                } catch (ClassNotFoundException e) {                    // fallback, in case the servlet container fails to set the                    // context class loader.                    mainClass = Class.forName(mainClassName);                }                Object main = mainClass.newInstance();            } catch (Exception ex) {                log.fatal("could not load wings.mainclass: " +                        config.getInitParameter("wings.mainclass"), ex);                throw new ServletException(ex);            }        } finally {            // The session was set by the constructor. After init we            // expect that only doPost/doGet is called, which set the            // session also. So remove it here.            SessionManager.removeSession();        }    }