aspose file tools*
The moose likes Servlets and the fly likes File Upload urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "File Upload urgent" Watch "File Upload urgent" New topic
Author

File Upload urgent

Arul anandham
Greenhorn

Joined: Jul 26, 2001
Posts: 4
hai
I am using html FILE Tag . In This I want to give the file path directly not by selecting throw browser button.
How It cab be.
If Possible post sample code
Bai
Arul
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16233
    
  21

response.setContentType("application/msword");
response.setHeader("Pragma" , "no-cache");
response.setHeader("Cache-Control" , "no-cache");
response.setDateHeader("Expires" , 0);
response.setHeader("Content-Disposition" , "inline; " + "filename=\"MailingLists.rtf\"");
response.setHeader("Content-Description" ,
"Display database as RTF");
====
It's the Content-Disposition that does it. Depending on the browser, you can select in-the-browser viewing, automatic download (attachment) or other options.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: File Upload urgent