response.sendRedirect("....");
response.sendError(response.SC_NOT_FOUND, message);
long currentTime = System.currentTimeMillis();
long tenMinutes = 10*60*1000; // In milliseconds
response.setDateHeader("Expires",
currentTime + tenMinutes);
response.setHeader("Refresh", "5; URL=http://host/path/");
//Building Excel Spreadsheets
response.setContentType("application/vnd.ms-excel");
PrintWriter out = response.getWriter();
out.println("\tQ1\tQ2\tQ3\tQ4\tTotal");
out.println("Apples\t78\t87\t92\t29\t=SUM(B2:E2)");
out.println("Oranges\t77\t86\t93\t30\t=SUM(B3:E3)");
//build jpg file
response.setContentType("image/jpeg");
MessageImage.writeJPEG
(MessageImage.makeMessageImage(message,
fontName,
fontSize),
response.getOutputStream());
response.sendError(response.SC_NOT_FOUND, message);
long currentTime = System.currentTimeMillis();
long tenMinutes = 10*60*1000; // In milliseconds
response.setDateHeader("Expires",
currentTime + tenMinutes);
response.setHeader("Refresh", "5; URL=http://host/path/");
//Building Excel Spreadsheets
response.setContentType("application/vnd.ms-excel");
PrintWriter out = response.getWriter();
out.println("\tQ1\tQ2\tQ3\tQ4\tTotal");
out.println("Apples\t78\t87\t92\t29\t=SUM(B2:E2)");
out.println("Oranges\t77\t86\t93\t30\t=SUM(B3:E3)");
//build jpg file
response.setContentType("image/jpeg");
MessageImage.writeJPEG
(MessageImage.makeMessageImage(message,
fontName,
fontSize),
response.getOutputStream());
Comments
Post a Comment