setting download file name

2005-03-06 Thread Dr NoName
Hi all, I am trying to make link to a dynamically generated zip file which the user can download. It links to a jsp page like so: a href=audio_download.jspDownload Audio/a In audio_download.jsp, I have the following code to generate the zip: jsp:useBean scope=session id=myLatestAudioFiles

Re: setting download file name

2005-03-06 Thread Darren Govoni
Try this. I used it for JNLP, but it should work for zip. Just replace .jnlp with .zip String fileName = request.getServletPath(); fileName = fileName.substring(fileName.lastIndexOf(/) + 1); fileName = fileName.substring(0, fileName.indexOf(.)) + .jnlp; response.addHeader(Content-Disposition,

Re: setting download file name

2005-03-06 Thread Dr NoName
that works. thanks. Eugene --- Darren Govoni [EMAIL PROTECTED] wrote: Try this. I used it for JNLP, but it should work for zip. Just replace .jnlp with .zip String fileName = request.getServletPath(); fileName = fileName.substring(fileName.lastIndexOf(/) + 1); fileName =

Re: download file issue

2003-11-25 Thread Andoni
: Ostad, James [EMAIL PROTECTED] To: Tom (E-mail) [EMAIL PROTECTED] Sent: Monday, November 24, 2003 4:24 PM Subject: download file issue I have created a web site that allows users to download files. It is working at the server level, but not out site of the server, at user level. Server is win2k

Re: download file issue

2003-11-25 Thread Andoni
Sorry, wasn't looking at list in date order!! A. - Original Message - From: Andoni [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 10:33 AM Subject: Re: download file issue Please give a little more detail about what actually goes wrong

RE: download file issue

2003-11-25 Thread Ostad, James
I appreciate your trying to help. Thanks, James -Original Message- From: Andoni [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 5:55 AM To: Tomcat Users List Subject: Re: download file issue Sorry, wasn't looking at list in date order!! A. - Original Message

download file issue

2003-11-24 Thread Ostad, James
I have created a web site that allows users to download files. It is working at the server level, but not out site of the server, at user level. Server is win2k adv. server. Tomcat is 4.1.29 Any suggestion would appreciated. James Out--- (1)

Re: download file issue

2003-11-24 Thread Christopher Schultz
James, I have created a web site that allows users to download files. It is working at the server level, but not out site of the server, at user level. Can you describe what you mean by doesn't work outside the server? What happens when you try to download? -chris

RE: download file issue

2003-11-24 Thread Ostad, James
. Thanks James -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 11:57 AM To: Tomcat Users List Subject: Re: download file issue James, I have created a web site that allows users to download files. It is working at the server level

Re: download file issue

2003-11-24 Thread Christopher Schultz
James, I am not using IIS at this time. So, this is standalone Tomcat. Okay. I am able to login, pass the information, and even get the database file information with an hyperlink to the file. But when I double click on it gives me an error page, or if I right click on it to save the target as,

RE: download file issue

2003-11-24 Thread Ostad, James
appreciate your help. James -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 12:09 PM To: Tomcat Users List Subject: Re: download file issue James, I am not using IIS at this time. So, this is standalone Tomcat. Okay. I am able to login

Re: download file issue

2003-11-24 Thread Christopher Schultz
James, Here is the error page: The page cannot be displayed The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. Sorry for the back-and-forth: is this a Tomcat error (light blue and

RE: download file issue

2003-11-24 Thread Ostad, James
the hyperlink, at the bottom of the status bar I see this address: file://ipaddress/temp$/ceo/test/temp$/00064735.tif(local) -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 12:30 PM To: Tomcat Users List Subject: Re: download file

Re: download file issue

2003-11-24 Thread Christopher Schultz
James, You have no idea what I have gone through to figure this out. I will do this as long as you last. That is not a tomcat error. It is an IE error. \\ipaddress\temp$\ceo\test\temp$\00064735.tif I have not activated the DNS yet, that is why the IP address is showing up. when I move the cursor

RE: download file issue

2003-11-24 Thread Ostad, James
, at the browser level I see only the file name, before getting this error. James -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:18 PM To: Tomcat Users List Subject: Re: download file issue James, You have no idea what I have gone through

RE: download file issue

2003-11-24 Thread Ostad, James
the file from source to target - then create this path format for url download, as you directed me Thank you so much, James -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:18 PM To: Tomcat Users List Subject: Re: download file

Re: download file issue

2003-11-24 Thread Christopher Schultz
James, With your help, I got it to work. Thank you so much, Glad you got it working. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Hide download file

2002-07-18 Thread Cox, Charlie
); return; } chain.doFilter(req,resp); } -Original Message- From: Lars Nielsen Lind [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 5:34 PM To: Tomcat Users List Subject: Re: Hide download file Cox, Charlie wrote

Hide download file

2002-07-17 Thread Lars Nielsen Lind
Hi. We are using an Upload component to upload files to the server. The files are placed in /fileserver/files - a directory outside of webapps. Anyone that have example files on how to retrive the files (download) via JavaBean/JSP from a directory outside of webapps? Best regards, Lars

Re: Hide download file

2002-07-17 Thread Irina Lishchenko
On Wednesday 17 July 2002 16:48, you wrote: Hi. We are using an Upload component to upload files to the server. The files are placed in /fileserver/files - a directory outside of webapps. Anyone that have example files on how to retrive the files (download) via JavaBean/JSP from a

RE: Hide download file

2002-07-17 Thread Cox, Charlie
: Hide download file On Wednesday 17 July 2002 16:48, you wrote: Hi. We are using an Upload component to upload files to the server. The files are placed in /fileserver/files - a directory outside of webapps. Anyone that have example files on how to retrive the files (download

Re: Hide download file

2002-07-17 Thread Lars Nielsen Lind
List Subject: Re: Hide download file On Wednesday 17 July 2002 16:48, you wrote: Hi. We are using an Upload component to upload files to the server. The files are placed in /fileserver/files - a directory outside of webapps. Anyone that have example files on how to retrive the files

RE: Hide download file

2002-07-17 Thread Cox, Charlie
I just answered this last week. Use a filter that checks the session and leave your download files in a directory under webapps. Filters make this simple. Don't do any more work than you need to :) Charlie I have found an article at www.javaworld.com about witing servlets for

Re: Hide download file

2002-07-17 Thread Lars Nielsen Lind
session variable defined access to download file(s)? Best regards, Lars Nielsen Lind -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]

download file

2002-07-16 Thread @Basebeans.com
Subject: download file From: J. Jason Zhou [EMAIL PROTECTED] === I have both Tomcat and IIS running on two machines. But when I download a file (abc.xls) from Tomcat, the browser loads the binary content without prompting uisng the save/open dialog while IIS did prompt before the download. http

Re: download file

2002-07-16 Thread rsequeira
:download file Subject: download file From: J. Jason Zhou [EMAIL PROTECTED] === I have both Tomcat and IIS running on two machines. But when I download a file (abc.xls) from Tomcat, the browser loads the binary content without prompting uisng the save/open dialog while IIS did prompt before

RE: download file

2002-07-16 Thread Turner, John
:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 10:10 AM To: [EMAIL PROTECTED] Subject: download file Subject: download file From: J. Jason Zhou [EMAIL PROTECTED] === I have both Tomcat and IIS running on two machines. But when I download a file (abc.xls) from Tomcat, the browser loads the binary

RE: How to hide a download file

2002-07-12 Thread Michael Rimov
At 11:43 AM 7/11/2002 -0500, you wrote: I'm going to have to inevitably add it to my site soon, I was going to approach it the same way, but with a servlet isn't it possible to pipe a file by setting the response mime type and streaming it out as a PDF or EXE. Of course IE does it's own thing no

How to hide a download file

2002-07-11 Thread Kevin Passey
Hi all, I need to pick your brains again. I need to publish a site that requires a user to fill in a form before displaying a download link. What I need to do is to hide the file to be downloaded so that it cannot be downloaded without the form being filled in - i.e it can only be downloaded

Re: How to hide a download file

2002-07-11 Thread Alex Short
Certainly not the most elegant solution but you could keep the real file in a unreachable location, and upon submitting it copy's the file to a cookie_date_time_filename.ext and has them download that. Then you run a cleaner script to erase these temp files after 24 hours. Alex Hi all,

RE: How to hide a download file

2002-07-11 Thread Jacob Hookom
Message- From: Alex Short [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 11:36 AM To: Tomcat Users List Subject: Re: How to hide a download file Certainly not the most elegant solution but you could keep the real file in a unreachable location, and upon submitting it copy's the file

RE: How to hide a download file

2002-07-11 Thread Turner, John
Passey [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 12:24 PM To: Tomcat Users List (E-mail) Subject: How to hide a download file Hi all, I need to pick your brains again. I need to publish a site that requires a user to fill in a form before displaying a download link. What I need

RE: How to hide a download file

2002-07-11 Thread Cox, Charlie
To: Tomcat Users List Subject: Re: How to hide a download file Certainly not the most elegant solution but you could keep the real file in a unreachable location, and upon submitting it copy's the file to a cookie_date_time_filename.ext and has them download that. Then you run

RE: How to hide a download file

2002-07-11 Thread Cox, Charlie
to and it gets redirected when you want it to. Charlie -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 12:46 PM To: 'Tomcat Users List' Subject: RE: How to hide a download file Off the top of my head, couldn't you pipe together

RE: How to hide a download file

2002-07-11 Thread Kevin Passey
input. Kevin -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: 11 July 2002 17:46 To: 'Tomcat Users List' Subject: RE: How to hide a download file you can use a filter to see if the referring page is your form and then allow the download or redirect to your form

RE: How to hide a download file

2002-07-11 Thread Cox, Charlie
PM To: 'Tomcat Users List' Subject: RE: How to hide a download file I was thinking of setting something in the session for the download page anyway which would direct a user back to the form. But if I create a directory called downloads and put the file in there - what's to stop

Re: How to hide a download file

2002-07-11 Thread Eddie Bush
If you make them login, you could put a security constraint on your downloads directory. That would pretty well seal it up, I believe =) HTH, Eddie Kevin Passey wrote: snip But if I create a directory called downloads and put the file in there - what's to stop someone just typing the

Re: How to hide a download file

2002-07-11 Thread Ian McFarland
Why don't you just handle it by putting something in their session saying that they filled out the form correctly, and write a downloader servlet that looks for that something, and will only send them the bits if they've filed out the form? Writing a servlet to send a file is pretty darned

AW: How to hide a download file

2002-07-11 Thread Ralph Einfeldt
are not present) -Ursprüngliche Nachricht- Von: Ian McFarland [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 12. Juli 2002 00:59 An: Tomcat Users List Betreff: Re: How to hide a download file Writing a servlet to send a file is pretty darned trivial. Writing one that knows something about

How download file from servlet?

2001-09-06 Thread Evgeniy Strokin
HI I trying make servlet for downloading of files. When I use: FileInputStream fl=new FileInputStream(dir); byte b[]=new byte[4096]; int len=0; ServletOutputStream souts=_response.getOutputStream(); while(len!=-1){ len=fl.read(b);

Re: How download file from servlet?

2001-09-06 Thread Craig R. McClanahan
On Thu, 6 Sep 2001, Evgeniy Strokin wrote: Date: Thu, 6 Sep 2001 11:43:56 -0400 From: Evgeniy Strokin [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat-User@Jakarta. Apache. Org [EMAIL PROTECTED] Subject: How download file from servlet? HI I trying make servlet for downloading

RE: How download file from servlet?

2001-09-06 Thread Martin van den Bemt
There is already a _response.getWriter() or getOutputStream() before your code snippet Mvgr, Martin -Original Message- From: Evgeniy Strokin [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 06, 2001 5:44 PM To: Tomcat-User@Jakarta. Apache. Org Subject: How download file

download file that is stored in a database

2001-02-25 Thread Mon-Quen Huang
I have a file stored in the backend Oracle database and has JSP communicating with the database in JDBC. I would like to allow user to click on a hyperlink and then download the file which is stored in the database. Is this possible? If so, what are the steps to implement it? Thanks, MH

Re: download file that is stored in a database

2001-02-25 Thread Steve Ruby
Mon-Quen Huang wrote: I have a file stored in the backend Oracle database and has JSP communicating with the database in JDBC. I would like to allow user to click on a hyperlink and then download the file which is stored in the database. Is this possible? If so, what are the steps to

TOMCAT DOWNLOAD FILE WHERE??

2001-01-29 Thread R N Mukherjee
SUB:TOMACT DOWNLOAD FILE(WHERE??) AT JAKARTA FOR WIN98/NT Dear all, can anyone of you please tell which file to download for tomcat3.2.1 for WIN98/NT OS.: (http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin) Index of /builds/jakarta-tomcat/release/v3.2.1/bin [DIR

Re: TOMCAT DOWNLOAD FILE WHERE??

2001-01-29 Thread Robuschi \(Delfi\)
The right file is jakarta-tomcat-3.2.1.zip Bye!!! Roberto Robuschi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]

Re: TOMCAT DOWNLOAD FILE WHERE??

2001-01-29 Thread Rick Smith
. Then very carefully follow the install instructions. Rick R N Mukherjee wrote: SUB:TOMACT DOWNLOAD FILE(WHERE??) AT JAKARTA FOR WIN98/NT Dear all, can anyone of you please tell which file to download for tomcat3.2.1 for WIN98/NT OS.: (http://jakarta.apache.org/builds/jakarta-tomcat