throw new ServletException("No resource id nor local URL specified.");
}
BufferedInputStream inputStream = null;
if (id != null) {
IResourceBase resource = ResourceManager.getInstance()
.getRegistered(id);
if (resource == null) {
throw new ServletException("Bad resource id : " + id);
}
response.setContentType(resource.getMimeType());
completeFileName(response, resource.getName());
long resourceLength = resource.getSize();
if (resourceLength > 0) {
response.setContentLength((int) resourceLength);
}
if (resource instanceof IResource) {