This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
hi all, I am developing pages for Clarfy 12.5 CRM web application. We are using Weblogic app server 8.1.
One of my requirements is, on click of hyperlink, a file is to be created dynamically and downloaded at a particular location on the client's machine. In case the file is already present, it has to be over written.
is there any way where we can access the client's system and store the file at the required folder? I feel one cannot access the client machine when the code is being executed on the server.. Is there a way, we can force the download dialog to appear and ask the end-user to choose the location??
Is there a way, we can force the download dialog to appear and ask the end-user to choose the location??
You won't be able to make a hyperlink in browser save a file to a particular location, but you could maybe force a save-file dialog by setting the mime type of the data to something that the browser will not recognise. Is the link to an actual file, or to a servlet URL or similar that will stream the data directly?
SCJP 1.4, www.gsi3d.org.uk
Joined: Apr 11, 2001
Hi Ben, thanx for the prompt reply, The file is actually to be created dynamically on click of the hyperlink and saved on the client machine. The file is a .ARTask file which is used by Remedy Tool. The jsp page is actually a part of CLarify CRM 12.5 thin client web architecture. Can u help me as to how to set the type of file to something which the browser won't understand and hence force a save-file dialog box? Also, is it possible to have a specified location say "c:\clarify" to appear in the dialog box as default ?
Thanx a lot in advance, Appreciate your prompt reply ..
Joined: Aug 14, 2001
Well, in a servlet I use to stream some file content straight to the browser I just make up a mime-type that I know the system will not recognise
this causes the browser to display a file download dialog from which you can save. I don't think there would be a way to specify a default directory though.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi