Mainly you can use outputstreams
to send the file contents as @The New Idiot mentioned. .pdf files, zip file, image files etc.
In such scenarios, get the output stream of your servlet and to that write the contentes
OutputStream outStream = response.getOutputStream();
FileInputSteram fis = new FileInputStream(new File("abc.pdf));
byte[] buf = new byte[4096];
int len = -1;
while ((len = fis.read(buf)) != -1) {
outStream .write(buf, 0, len);
}
response.setContentType("application/octect");(if type is binary) else
response.setContentType("text/html");
outStream .flush();
outStream.close();