code: public static void writeClassPathResource(HttpServletResponse response, String path, String contentType) throws IOException
  	{
  		if (path.startsWith("/"))
  		{
  			path = path.substring(1);
  		}
  
  //		System.out.println(new LogEntry("trying to retrieve " + path + " from classloader");
  		InputStream input = ServletSupport.class.getClassLoader().getResourceAsStream(path);
  		if (input != null)
  		{
  			response.setContentType(contentType);
  			OutputStream out = response.getOutputStream();
  			int available = input.available();
  			while (available > 0)
  			{
  				byte[] buf = new byte[available];
  				input.read(buf);
  				out.write(buf);
  				available = input.available();
  			}
  		}
  		else
  		{
  			System.out.println(new LogEntry("resource " + path + " not found"));
  		}
  	}
docs: Obtains binary resource from classpath and writes it to http response.
  
  @param response
  @param path file name of the resource to write to http servlet response
  @param contentType