public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { WebletRequest webRequest = null; if (request instanceof HttpServletRequest) { HttpServletRequest httpRequest = (HttpServletRequest) request; String contextPath = httpRequest.getContextPath(); String requestURI = getCanonicalPath(httpRequest.getServletPath()); long ifModifiedSince = httpRequest.getDateHeader("If-Modified-Since"); try { String[] parsed = _webletContainer.parseWebletRequest(contextPath, requestURI, ifModifiedSince); if (parsed != null) { String webletName = parsed[0]; String webletPath = parsed[1]; String webletPathInfo = parsed[2]; webRequest = new WebletRequestImpl(webletName, webletPath, contextPath, webletPathInfo, ifModifiedSince, httpRequest); HttpServletResponse httpResponse = (HttpServletResponse) response; httpRequest.setCharacterEncoding("UTF-8"); String contentName = webRequest.getPathInfo(); String contentTypeDefault = _servletContext.getMimeType(contentName); WebletResponse webResponse = new WebletResponseImpl(contentTypeDefault, httpResponse); _webletContainer.service(webRequest, webResponse); } } catch (WebletException e) { throw new ServletException(e); } } if (webRequest == null) chain.doFilter(request, response); }
protected void doGet(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { String contextPath = httpRequest.getContextPath(); String requestURI = getCanonicalPath(httpRequest.getPathInfo()); long ifModifiedSince = httpRequest.getDateHeader("If-Modified-Since"); try { String[] parsed = _webletContainer.parseWebletRequest(contextPath, requestURI, ifModifiedSince); if (parsed != null) { String webletName = parsed[0]; String webletPath = parsed[1]; String webletPathInfo = parsed[2]; WebletRequest webRequest = new WebletRequestImpl(webletName, webletPath, contextPath, webletPathInfo, ifModifiedSince, httpRequest); ServletContext servletContext = getServletContext(); String contentName = webRequest.getPathInfo(); String contentTypeDefault = getServletContext().getMimeType(contentName); WebletResponse webResponse = new WebletResponseImpl(contentTypeDefault, httpResponse); _webletContainer.service(webRequest, webResponse); } } catch (WebletException e) { throw new ServletException(e); } }
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { WebletRequest webRequest = null; if (request instanceof HttpServletRequest) { HttpServletRequest httpRequest = (HttpServletRequest) request; String contextPath = httpRequest.getContextPath(); String requestURI = getCanonicalPath(httpRequest.getServletPath()); long ifModifiedSince = httpRequest.getDateHeader("If-Modified-Since"); try { String[] parsed = _webletContainer.parseWebletRequest(contextPath, requestURI, ifModifiedSince); if (parsed != null) { String webletName = parsed[0]; String webletPath = parsed[1]; String webletPathInfo = parsed[2]; webRequest = new WebletRequestImpl(webletName, webletPath, contextPath, webletPathInfo, ifModifiedSince, httpRequest); HttpServletResponse httpResponse = (HttpServletResponse) response; httpRequest.setCharacterEncoding("UTF-8"); String contentName = webRequest.getPathInfo(); String contentTypeDefault = _servletContext.getMimeType(contentName); WebletResponse webResponse = new WebletResponseImpl(contentTypeDefault, httpResponse); _webletContainer.service(webRequest, webResponse); } } catch (WebletException e) { throw new ServletException(e); } } if (webRequest == null) chain.doFilter(request, response); }
protected void doGet(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { String contextPath = httpRequest.getContextPath(); String requestURI = getCanonicalPath(httpRequest.getPathInfo()); long ifModifiedSince = httpRequest.getDateHeader("If-Modified-Since"); try { String[] parsed = _webletContainer.parseWebletRequest(contextPath, requestURI, ifModifiedSince); if (parsed != null) { String webletName = parsed[0]; String webletPath = parsed[1]; String webletPathInfo = parsed[2]; WebletRequest webRequest = new WebletRequestImpl(webletName, webletPath, contextPath, webletPathInfo, ifModifiedSince, httpRequest); ServletContext servletContext = getServletContext(); String contentName = webRequest.getPathInfo(); String contentTypeDefault = getServletContext().getMimeType(contentName); WebletResponse webResponse = new WebletResponseImpl(contentTypeDefault, httpResponse); _webletContainer.service(webRequest, webResponse); } } catch (WebletException e) { throw new ServletException(e); } }
String contentTypeDefault = servletContext.getMimeType(contentName); WebletResponse webResponse = new WebletResponseImpl(contentTypeDefault, httpResponse); container.service(webRequest, webResponse); context.responseComplete();
String contentTypeDefault = servletContext.getMimeType(contentName); WebletResponse webResponse = new WebletResponseImpl(contentTypeDefault, httpResponse); container.service(webRequest, webResponse); context.responseComplete();