if (xsltInputStream==null) {
return renderHtml(contextPath, cacheEntry);
- } else {
- return renderXml(contextPath, cacheEntry, xsltInputStream);
}
-
+ return renderXml(contextPath, cacheEntry, xsltInputStream);
+
}
/**
* Get the readme file as a string.
*/
protected String getReadme(DirContext directory)
- throws IOException, ServletException {
+ throws IOException {
if (readmeFile != null) {
try {
* Return the xsl template inputstream (if possible)
*/
protected InputStream findXsltInputStream(DirContext directory)
- throws IOException, ServletException {
+ throws IOException {
if (localXsltFile != null) {
try {
}
request.setAttribute("org.apache.tomcat.sendfile.token", this);
return true;
- } else {
- return false;
}
+ return false;
}
* processing is stopped
*/
protected boolean checkIfModifiedSince(HttpServletRequest request,
- HttpServletResponse response,
- ResourceAttributes resourceAttributes)
- throws IOException {
+ HttpServletResponse response,
+ ResourceAttributes resourceAttributes) {
try {
long headerValue = request.getDateHeader("If-Modified-Since");
long lastModified = resourceAttributes.getLastModified();
response.setHeader("ETag", eTag);
return false;
- } else {
- response.sendError
- (HttpServletResponse.SC_PRECONDITION_FAILED);
- return false;
}
+ response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
+ return false;
}
}
return true;