((Request)request).setHandled(true);
return;
}
URL = URLDecoder.decode(URL, "UTF-8");
DocumentCacheItem doc = multiCache.getItem(URL);
if (doc != null) {
response.setContentType(doc.getMimeType());
if (doc.getMimeType().equals("text/html")) {
StringTemplate template = frameTemplate.getInstanceOf();
template.setAttribute("url", URL);
response.getOutputStream().write(template.toString().getBytes());
}
response.getOutputStream().write(doc.getContent());
} else {
StringTemplate template = notFoundTemplate.getInstanceOf();
template.setAttribute("url", URL);
response.getOutputStream().write(template.toString().getBytes());
// response.sendError(HttpServletResponse.SC_NOT_FOUND);