It's not a secret anymore!*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 15662
    
  15

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Upload urgent
 
Similar Threads
File constructor
requested resource (first.jsp) not available
Ant error: Make sure you have it in you classpath
Adding a file to a program
JMF