SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankit Garg wrote:Do you want to save the file on the server or on client machine?? If you want to save the file on client machine, then you cannot control where the file will be saved. When the browser is asked to download a file, it prompts the user about where to store the file. You can control the name of the file using the content-disposition header...
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankit Garg wrote:Arun, you can't write files to client machine like that. You'll have to write the file to the ServletOutputStream. You can only control the name of the file. You'll have to modify your code somehow to work with both the Swing and Struts app...
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |