Hello,
I have this code,
the dispatcher don't work..
Any idea?
OutputStream out;
String fileName;
String content;
byte[] data;
// Seteo el nombre del archivo
fileName = "vpn_amp.txt";
// Seteo el contenido del archivo
content = "troz";
// Seteo el content type
response.setContentType("application/x-unknown"
response.setContentLength(content.length());
response.setHeader("Content-Disposition", "attachment; filename="+fileName);
// The file content
out = response.getOutputStream();
data = content.getBytes();
out.write(data);
// Close
out.close();
****** this don't work *************
String URL = "/Rating/RatingGetFile.jsp";
getServletContext().getRequestDispatcher(URL).forward( request , response );
***************************************
return;
I have this code,
the dispatcher don't work..
Any idea?
OutputStream out;
String fileName;
String content;
byte[] data;
// Seteo el nombre del archivo
fileName = "vpn_amp.txt";
// Seteo el contenido del archivo
content = "troz";
// Seteo el content type
response.setContentType("application/x-unknown"
response.setContentLength(content.length());
response.setHeader("Content-Disposition", "attachment; filename="+fileName);
// The file content
out = response.getOutputStream();
data = content.getBytes();
out.write(data);
// Close
out.close();
****** this don't work *************
String URL = "/Rating/RatingGetFile.jsp";
getServletContext().getRequestDispatcher(URL).forward( request , response );
***************************************
return;