Client side downloading code

Reply

Join Date: Feb 2009
Posts: 13
Reputation: rlaknar is an unknown quantity at this point 
Solved Threads: 0
rlaknar rlaknar is offline Offline
Newbie Poster

Client side downloading code

 
0
  #1
Apr 23rd, 2009
Hi. I am developing an e-mail application for lab works. I am using servlets mainly along with JSP and using HTML with CSS. I have two questions.Please tell me the solutions. Its important and its urgent.
1. As usual I give the provision for attachments.I wrote code for uploading files for attachment and it works. I dont know how to download the file when the client needs it from the server. Please help me.Its urgent.If code is offered it would be great.
2.I have used servlets for some pages. In these pages the CSS file is not gettng accepted. The format, image is not getting displayed. I dont know what to do. Please help.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 21
Reputation: amarjeetsingh has a little shameless behaviour in the past 
Solved Threads: 1
amarjeetsingh amarjeetsingh is offline Offline
Newbie Poster

Re: Client side downloading code

 
0
  #2
Apr 28th, 2009
hi friend
for downloading the files on your server
Give the full path of the file in the Jsp page
which will locate on the server
  1. <a href="www.yourserver.com/java/chapter.txt" >Download file</a>

if you want to download the file in the zip format then you
must upload the file in the zip format
then the path will be
  1. <a href="www.yourserver.com/java/chapter.zip" >Download file</a>

remember the
  1. <a href="dynamic value get from servlet through bean getter method ">

you must set the path of the file in bean setter property
Last edited by amarjeetsingh; Apr 28th, 2009 at 3:15 am.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 13
Reputation: rlaknar is an unknown quantity at this point 
Solved Threads: 0
rlaknar rlaknar is offline Offline
Newbie Poster

Re: Client side downloading code

 
0
  #3
Apr 28th, 2009
Thanks for your reply.I have another question. How can I make the downloading file to save on the client's disk? Please help!
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 21
Reputation: amarjeetsingh has a little shameless behaviour in the past 
Solved Threads: 1
amarjeetsingh amarjeetsingh is offline Offline
Newbie Poster

Re: Client side downloading code

 
0
  #4
Apr 28th, 2009
my dear frnd
i gave the answere of your question
Please read it carefully
when the client click the link
download file, it automatically ask from the client
do you want to save it
if client click the YES
then after browsing ,client save the file
where he desire
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 13
Reputation: rlaknar is an unknown quantity at this point 
Solved Threads: 0
rlaknar rlaknar is offline Offline
Newbie Poster

Re: Client side downloading code

 
0
  #5
Apr 28th, 2009
Sire, I have tried for zip file, its working as you said, i when i tried for txt file browser displays the content directly. For this what i should do?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC