String base = URIUtil.addPaths(request.getRequestURI(),URIUtil.SLASH);
return new DeferredAuthentication(this); if (isLoginOrErrorPage(URIUtil.addPaths(request.getServletPath(),request.getPathInfo())) &&!DeferredAuthentication.isDeferred(response)) return new DeferredAuthentication(this); base_response.sendRedirect(redirectCode, response.encodeRedirectURL(URIUtil.addPaths(request.getContextPath(),_formErrorPage))); base_response.sendRedirect(redirectCode, response.encodeRedirectURL(URIUtil.addPaths(request.getContextPath(),_formLoginPage)));
InvokedRequest(HttpServletRequest request, boolean included, String name, String servletPath, String pathInfo) { super(request); _included=included; _servletPath=URIUtil.addPaths(servletPath,name); _pathInfo=pathInfo.substring(name.length()+1); if (_pathInfo.length()==0) _pathInfo=null; }
InvokedRequest(HttpServletRequest request, boolean included, String name, String servletPath, String pathInfo) { super(request); _included=included; _servletPath=URIUtil.addPaths(servletPath,name); _pathInfo=pathInfo.substring(name.length()+1); if (_pathInfo.length()==0) _pathInfo=null; }
InvokedRequest(HttpServletRequest request, boolean included, String name, String servletPath, String pathInfo) { super(request); _included=included; _servletPath=URIUtil.addPaths(servletPath,name); _pathInfo=pathInfo.substring(name.length()+1); if (_pathInfo.length()==0) _pathInfo=null; }
@Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // only redirect if its / to hawtio if (req.getRequestURI().equals("/")) { String url = URIUtil.addPaths(req.getRequestURI(), "hawtio"); resp.sendRedirect(url); } } }
@Override public String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException { target = URIUtil.addPaths(_replacement, PathMap.pathInfo(_pattern,target)); return target; }
public String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException { target = URIUtil.addPaths(_replacement, PathMap.pathInfo(_pattern,target)); return target; }
@Override public String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException { target = URIUtil.addPaths(_replacement, PathMap.pathInfo(_pattern, target)); return target; }
@Override public String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException { Map.Entry<?,?> rewrite =_rewrite.getMatch(target); if (rewrite!=null && rewrite.getValue()!=null) { target=URIUtil.addPaths(rewrite.getValue().toString(), PathMap.pathInfo(rewrite.getKey().toString(),target)); return target; } return null; }
@Override public String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException { Map.Entry<?,?> rewrite =_rewrite.getMatch(target); if (rewrite!=null && rewrite.getValue()!=null) { target=URIUtil.addPaths(rewrite.getValue().toString(), PathMap.pathInfo(rewrite.getKey().toString(),target)); return target; } return null; }
@Override public String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException { Map.Entry<?,?> rewrite =_rewrite.getMatch(target); if (rewrite!=null && rewrite.getValue()!=null) { target=URIUtil.addPaths(rewrite.getValue().toString(), PathMap.pathInfo(rewrite.getKey().toString(),target)); return target; } return null; }
@Override public Resource addPath(String path) throws MalformedURLException { if (path == null) { return null; } path = URIUtil.canonicalPath(path); URL url = new URL(URIUtil.addPaths(this._url.toExternalForm(), path)); return new BundleURLResource(url); }
/** * Returns the resource contained inside the current resource with the * given name */ @Override public Resource addPath(String path) throws IOException,MalformedURLException { if (path==null) return null; path = URIUtil.canonicalPath(path); return newResource(URIUtil.addPaths(_url.toExternalForm(),path)); }
protected void notFound(Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (LOG.isDebugEnabled()) LOG.debug("Not Found {}",request.getRequestURI()); if (getHandler()!=null) nextHandle(URIUtil.addPaths(request.getServletPath(),request.getPathInfo()),baseRequest,request,response); }
protected void notFound(Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (LOG.isDebugEnabled()) LOG.debug("Not Found {}",request.getRequestURI()); if (getHandler()!=null) nextHandle(URIUtil.addPaths(request.getServletPath(),request.getPathInfo()),baseRequest,request,response); }
protected void notFound(Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (LOG.isDebugEnabled()) LOG.debug("Not Found {}",request.getRequestURI()); if (getHandler()!=null) nextHandle(URIUtil.addPaths(request.getServletPath(),request.getPathInfo()),baseRequest,request,response); }
public void applyURI(Request request, String oldTarget, String newTarget) throws IOException { String uri = URIUtil.addPaths(_replacement, PathMap.pathInfo(_pattern,request.getRequestURI())); request.setRequestURI(uri); }
@Override public void applyURI(Request request, String oldTarget, String newTarget) throws IOException { String uri = URIUtil.addPaths(_replacement, PathMap.pathInfo(_pattern,request.getRequestURI())); request.setRequestURI(uri); }