private void init(ServletContext context, HttpServletRequest request, HttpServletResponse response, FlowUrlHandler flowUrlHandler) { this.context = context; this.request = request; this.response = response; this.requestParameterMap = new LocalParameterMap(new HttpServletRequestParameterMap(request)); this.requestMap = new LocalAttributeMap<>(new HttpServletRequestMap(request)); this.sessionMap = new LocalSharedAttributeMap<>(new HttpSessionMap(request)); this.applicationMap = new LocalSharedAttributeMap<>(new HttpServletContextMap(context)); this.flowUrlHandler = flowUrlHandler; }
private void init(ServletContext context, HttpServletRequest request, HttpServletResponse response, FlowUrlHandler flowUrlHandler) { this.context = context; this.request = request; this.response = response; this.requestParameterMap = new LocalParameterMap(new HttpServletRequestParameterMap(request)); this.requestMap = new LocalAttributeMap<>(new HttpServletRequestMap(request)); this.sessionMap = new LocalSharedAttributeMap<>(new HttpSessionMap(request)); this.applicationMap = new LocalSharedAttributeMap<>(new HttpServletContextMap(context)); this.flowUrlHandler = flowUrlHandler; }
private void init(ServletContext context, HttpServletRequest request, HttpServletResponse response, FlowUrlHandler flowUrlHandler) { this.context = context; this.request = request; this.response = response; this.requestParameterMap = new LocalParameterMap(new HttpServletRequestParameterMap(request)); this.requestMap = new LocalAttributeMap(new HttpServletRequestMap(request)); this.sessionMap = new LocalSharedAttributeMap(new HttpSessionMap(request)); this.applicationMap = new LocalSharedAttributeMap(new HttpServletContextMap(context)); this.flowUrlHandler = flowUrlHandler; }
/** * Create a new external context wrapping given servlet HTTP request and response and given servlet context. * @param context the servlet context * @param request the HTTP request * @param response the HTTP response */ public ServletExternalContext(ServletContext context, HttpServletRequest request, HttpServletResponse response) { this.context = context; this.request = request; this.response = response; this.requestParameterMap = new LocalParameterMap(new HttpServletRequestParameterMap(request)); this.requestMap = new LocalAttributeMap(new HttpServletRequestMap(request)); this.sessionMap = new LocalSharedAttributeMap(new HttpSessionMap(request)); this.applicationMap = new LocalSharedAttributeMap(new HttpServletContextMap(context)); }
protected void setUp() throws Exception { super.setUp(); context = new MockServletContext(); // a fresh MockServletContext seems to already contain an element; // that's confusing, so we remove it context.removeAttribute("javax.servlet.context.tempdir"); tested = new HttpServletContextMap(context); tested.put("SomeKey", "SomeValue"); }