public void getResource(final OutputStream out, String resource) throws Exception { // String resource = requParam.getStringParameter("resource", null); resource = resource.startsWith("/") ? resource : "/" + resource; IRepositoryAccess repAccess = CdaEngine.getEnvironment().getRepositoryAccess(); IRepositoryFile resFile = repAccess.getRepositoryFile(resource, FileAccess.READ); if (resFile != null && resFile.exists()) { out.write(resFile.getData()); } }