Rob Levo

Ranch Hand
+ Follow
since Oct 01, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rob Levo

Originally posted by Jaap van Hengstum:

I spent quite a few hours on a similar problem also, so I can understand
What I know is that, in my situation, when you are running your servlet from within a security-constraint or HTTPS site, the server (Tomcat in my case) will automatically send a "Cache-Control: no-cache" header with every page (for obvious security reasons). This causes the browser (IE in my case) to disable caching the pages, so when a file is downloaded it is not stored on the disk (unless you specifically request to save it to another file by choosing 'save' in the popup dialog instead of 'open') and in some cases the browser cannot even remember the filename (which might or might not be a bug in IE).
So the solution is to overwrite the Cache-Control header when using content-disposition to download or display a file by setting the header in the code. The Cache-Control header can be set to 'public' or 'private' and I think 'private' may actually be a better choice because, according to the documentation, this requests public proxies not to cache the file but only private caches like the browser cache. I tried this and it works in IE.
This is what I know about this issue.
[ March 18, 2004: Message edited by: Jaap van Hengstum ]


Thanks for the explanation!!
Take care,
Rob
19 years ago

Originally posted by Jaap van Hengstum:
Maybe it's a caching problem. Try adding res.setHeader("Cache-Control", "public") to your servlet.


Jaap,
You are the best! Struggled with this for days with no success, and your code fixed the problem.
Can you please explain what the caching problem was, so I can understand going forward.
Thanks again!!
Rob
20 years ago
I understand there have been other messages regarding this topic, but I am having as problem I can not find the answer to, so please assist.
I am doing a simple binary download with the following code, and I am getting the wrong path for the file to be downloaded in the dialog that pops up in the browser.
exe_filename = "file_to_download.exe"
res.setContentType("application/octet-stream");
res.setHeader("Content-Disposition", "attachment;filename="+ exe_filename);
This code cause the dialog to pop up stating the wrong path and file to be downloaded.
Very frustrated, any help appreciated!!
Thank,
Rob
20 years ago
I am having the exact same problem.
"save as" dialog is displaying the name of the servlet instead of the file I am downloading. The download does bring down the correct file, so it is just a problem with the name.
Can someone please help here to get the dialog name correct.
Thanks!
Rob
20 years ago
Does anyone have example code of searching for files with specific string as a prefix or extension.
Thanks,
Rob
20 years ago
Need to do the following.
1) convert string date in specific format (ex. "04-30-2003 12:50:47") to unix time
2) subtract off one month - I got that part, lol.
3) convert the new unix time back to date in same specific format as original in step 1.
I have been unable to do this even though it seems like it should be straight forward. I am confused on what classes I should be using.
Thanks for the help!
Rob
20 years ago
Thanks Kathy.
Sounds like your book is in demand, congrats!!
Take care,
Rob
21 years ago
Does Install Shield have a competing product that gets updates from a Web server like WebStart or is WebStart the only product with that functionality right now?
21 years ago

Originally posted by Kathy Sierra:
Howdy -- I just stumbled in here. I only know a little about WebStart, but I do have it working, so I'll try to jump in here when I can. My post to the other (jboss) topic includes a list of little tips, but I'll be happy to answer any questions I'm capable of [and I'll tell you when I'm not]
cheers,
Kathy
Yay for Java on the Client!!!


Thanks Kathy, and good luck with the book!!
Rob
21 years ago
Anybody watching this topic
21 years ago
Does Java WebStart work with 1.4.
Thanks,
Rob
21 years ago
Nate,
Thanks for the clarification, big help!
Take care,
Rob
21 years ago