Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a download problem

Status
Not open for further replies.

emkay

Programmer
Apr 24, 2001
2
IN
hi friends
I'm working on a program to allow my clients to download a file after initial verification of his identity
The program works fine and gives the client the two options namely
1.open the file from its current location
2.save to disk
i'd like my program(i'm working in servlets)to directly save the downloadable file to a predefined folder say c:\program Files of the client's machine as soon as the verification is over.
As of now the code which i'm using to enable the download is as follows
public class down1 extends HttpServlet
{
public void doPost(HttpServletRequest req , HttpServletResponse resp) throws ServletException, IOException
{
resp.setContentType("text/html");
PrintWriter pw=resp.getWriter();
-----------------
-----------
--------
code for verification of identity
---------
---------
----------------
resp.sendRedirect("pw.println("Download complete");
pw.close();
}
the above program is working fine.
can anybody suggest me how go about changing my above code to download in a predefined folder of the client machine
without the need of getting to choose between one of the two options above.
I'd like the download to be saved automatically to c:\programFiles of the client machine.
an early response is eagerly awaited.
thanx in anticipation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top