943,822 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 1387
  • JSP RSS
Apr 23rd, 2009
0

Client side downloading code

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rlaknar is offline Offline
14 posts
since Feb 2009
Apr 28th, 2009
0

Re: Client side downloading code

Quote ...
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
JSP Syntax (Toggle Plain Text)
  1. <a href="www.yourserver.com/java/chapter.txt" >Download file</a>

Quote ...
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
JSP Syntax (Toggle Plain Text)
  1. <a href="www.yourserver.com/java/chapter.zip" >Download file</a>

Quote ...
remember the
JSP Syntax (Toggle Plain Text)
  1. <a href="dynamic value get from servlet through bean getter method ">

Quote ...
you must set the path of the file in bean setter property
Last edited by amarjeetsingh; Apr 28th, 2009 at 3:15 am.
Reputation Points: 2
Solved Threads: 1
Newbie Poster
amarjeetsingh is offline Offline
21 posts
since Feb 2009
Apr 28th, 2009
0

Re: Client side downloading code

Thanks for your reply.I have another question. How can I make the downloading file to save on the client's disk? Please help!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rlaknar is offline Offline
14 posts
since Feb 2009
Apr 28th, 2009
0

Re: Client side downloading code

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
Reputation Points: 2
Solved Threads: 1
Newbie Poster
amarjeetsingh is offline Offline
21 posts
since Feb 2009
Apr 28th, 2009
0

Re: Client side downloading code

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rlaknar is offline Offline
14 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: problem in understanding <logic:iterate> tag
Next Thread in JSP Forum Timeline: JSP not finding class files?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC