// these ones are FreeMarker specific and will only work in FTL templates, mainly here for backward compatibility
BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
context.put("sessionAttributes", new HttpSessionHashModel(session, wrapper));
context.put("requestAttributes", new HttpRequestHashModel(request, wrapper));
TaglibFactory JspTaglibs = new TaglibFactory(servletContext);
context.put("JspTaglibs", JspTaglibs);
context.put("requestParameters", UtilHttp.getParameterMap(request));
ServletContextHashModel ftlServletContext = (ServletContextHashModel) request.getAttribute("ftlServletContext");
context.put("Application", ftlServletContext);