Creation Date Changes when downloading PDF

Hi.

Everytime i dowload a file, it changes the creation date to the current date, not the "real" creation date.

Is it possible to use the file's creationdate when downloading it?

protectedvoid processRequest(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException{

File file =new File("test.pdf");

response.setHeader("Content-Encoding","deflate");

response.setHeader("Transfer-Encoding","deflate");

response.setContentType("application/pdf");

response.setHeader("Content-Disposition","attachment; filename=\"test.pdf\"");

ServletOutputStream sos = response.getOutputStream();

byte data[] =newbyte[(int)file.length()];

try

{

BufferedInputStream bufferedinputstream =new BufferedInputStream(new FileInputStream(file));

bufferedinputstream.read(data);

dos.write(data,0,data.length);

bufferedinputstream.close();

}

catch(Exception exception){

exception.printStackTrace();

}

sos.close();

}

best regards

matthias

[1865 byte] By [MaGla] at [2007-11-26 19:41:54]
# 1
Doesn't sounds logical to me. The file is created on your PC the exact moment you download it, doesn't it?
benubacha at 2007-7-9 22:23:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...