@Override public void init(ServletConfig config) throws ServletException { super.init(new ServletConfig() { @Override public String getServletName() { return config.getServletName(); } @Override public ServletContext getServletContext() { return config.getServletContext(); } @Override public Enumeration<String> getInitParameterNames() { // FIXME return config.getInitParameterNames(); } @Override public String getInitParameter(String name) { switch (name) { case "readonly": return "false"; case "listings": return "true"; default: return config.getInitParameter(name); } } }); }
@Override public void init(final ServletConfig config) throws ServletException { super.init(config); defaultServlet = new DefaultServlet(); defaultServlet.init(config); }
/** * Sets HttpServletResponse object used to set headers and send * output to * * @param response HttpServletResponse to be used * */ protected void setResponse(HttpServletResponse response) { this.response = response; updateReadyStatus(); }
private InputStream render(String contextPath, CacheEntry cacheEntry, ProxyDirContext proxyDirContext) throws IOException, ServletException { Source xsltSource = findXsltInputStream(cacheEntry.context); if (xsltSource == null) { return renderHtml(contextPath, cacheEntry, proxyDirContext); } else { return renderXml(contextPath, cacheEntry, xsltSource, proxyDirContext); } }
/** * Converts null strings to blank strings ("") * * @param s string to be converted if necessary * @return a non-null string, either the original or the empty string * ("") if the original was <code>null</code> */ protected String nullsToBlanks(String s) { return nullsToString(s, ""); }
@Override protected boolean checkIfHeaders(HttpServletRequest request, HttpServletResponse response, WebResource resource) throws IOException { if (!super.checkIfHeaders(request, response, resource)) return false; // TODO : Checking the WebDAV If header return true; }
defaultServlet.service(request, response); return;
/** * Return an InputStream to an HTML representation of the contents * of this directory. * * @param contextPath Context path to which our internal paths are * relative */ protected InputStream renderHtml (String contextPath, CacheEntry cacheEntry) throws IOException, ServletException { return renderHtml(contextPath, cacheEntry, resources); }
/** * Override the DefaultServlet implementation and only use the PathInfo. If * the ServletPath is non-null, it will be because the WebDAV servlet has * been mapped to a url other than /* to configure editing at different url * than normal viewing. * * @param request The servlet request we are processing */ @Override protected String getRelativePath(HttpServletRequest request) { return getRelativePath(request, false); }
/** * Sets standard input to be passed on to the invoked cgi script * * @param stdin InputStream to be used * */ protected void setInput(InputStream stdin) { this.stdin = stdin; updateReadyStatus(); }
/** * Converts null strings to blank strings ("") * * @param s string to be converted if necessary * @return a non-null string, either the original or the empty string * ("") if the original was <code>null</code> */ protected String nullsToBlanks(String s) { return nullsToString(s, ""); }
@Override protected boolean checkIfHeaders(HttpServletRequest request, HttpServletResponse response, WebResource resource) throws IOException { if (!super.checkIfHeaders(request, response, resource)) return false; // TODO : Checking the WebDAV If header return true; }
/** * Sets standard input to be passed on to the invoked cgi script * * @param stdin InputStream to be used * */ protected void setInput(InputStream stdin) { this.stdin = stdin; updateReadyStatus(); }
/** * Converts null strings to blank strings ("") * * @param s string to be converted if necessary * @return a non-null string, either the original or the empty string * ("") if the original was <code>null</code> */ protected String nullsToBlanks(String s) { return nullsToString(s, ""); }
/** * Sets HttpServletResponse object used to set headers and send * output to * * @param response HttpServletResponse to be used * */ protected void setResponse(HttpServletResponse response) { this.response = response; updateReadyStatus(); }
/** * Converts null strings to blank strings ("") * * @param s string to be converted if necessary * @return a non-null string, either the original or the empty string * ("") if the original was <code>null</code> */ protected String nullsToBlanks(String s) { return nullsToString(s, ""); }
/** * Sets HttpServletResponse object used to set headers and send * output to * * @param response HttpServletResponse to be used * */ protected void setResponse(HttpServletResponse response) { this.response = response; updateReadyStatus(); }
/** * Sets HttpServletResponse object used to set headers and send * output to * * @param response HttpServletResponse to be used * */ protected void setResponse(HttpServletResponse response) { this.response = response; updateReadyStatus(); }
/** * Sets standard input to be passed on to the invoked cgi script * * @param stdin InputStream to be used * */ protected void setInput(InputStream stdin) { this.stdin = stdin; updateReadyStatus(); }
/** * Sets standard input to be passed on to the invoked cgi script * * @param stdin InputStream to be used * */ protected void setInput(InputStream stdin) { this.stdin = stdin; updateReadyStatus(); }