Hi again,
I guess I didn't do a good job explaining my problem.
The response.sendRedirect(location) will redirect me to a file at a given
location BUT
it will display the content of that file to the browser.
But what I'm looking for is the ability to "redirect/upload" that file. Let
say, the file is on the
web server and I want to download it to my PC. With CGI program, I can
redirect to that file
(as explained below) and the SAVE BOX will show up on the browser to allow
me to save that file
to my harddisk. So I'm looking for a way to do the same functionality with
Java Servlet.
Thank you,
Woody
-----Original Message-----
From: Praveen Kumar S . [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 06, 2000 10:34 PM
To: Amornkul, Woody
Cc: [EMAIL PROTECTED]
Subject: RE: HELP: How to redirect to a file?
Hi,
<jsp:forward .../> in JSP
and
response.sendRedirect(loaction) in servlets
Amit
> -----Original Message-----
> From: Amornkul, Woody [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, January 07, 2000 4:55 AM
> To: [EMAIL PROTECTED]
> Subject: HELP: How to redirect to a file?
>
> Hi,
> With CGI, I can redirect the browser to a new file by the
> following
> two lines:
>
> printf("HTTP/1.0 302 Found\n");
> printf("Location: <path/filename>\n");
>
> The save box will appear to allow me to save the file.
>
> Can this be done with Java Servlet?
> I tried the following codes but it displays the content to the
> broswer instead.
>
> res.setStatus(res.SC_MOVED_TEMPORARILY);
> res.setHeader("Location", site);
>
> Thank you in advance,
> Woody
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html