Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Different ways to download file using servlet

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Different ways to download file using servlet

    According to my knowledge I know only one way to download file from Servlet As using FileInputStream reading the file writing the content using ServletOutPutStream.I want to know insteadof Stream is there any way to download file from Servlet.


  2. #2
    Member
    Join Date
    Jul 2013
    Posts
    219
    Thanks
    0
    Thanked 18 Times in 17 Posts

    Default Re: Different ways to download file using servlet

    Hello.
    You can use anchor tab <a href=""> in your html response from the servlet.

    Syed.

  3. #3
    Junior Member
    Join Date
    Sep 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Different ways to download file using servlet

    Quote Originally Posted by tsv786 View Post
    According to my knowledge I know only one way to download file from Servlet As using FileInputStream reading the file writing the content using ServletOutPutStream.I want to know insteadof Stream is there any way to download file from Servlet.

    Thank U very much.
    I want to know is there any way to download file as object using Servlet( we can use Spring Web Module also).
    like for file upload we have

    ServletFileUpload upload = new ServletFileUpload(factory);
    List<FileItem> formItems = upload.parseRequest(request);

    Thanks in Advance.

Similar Threads

  1. How to download a file off of the internet?
    By Hawke in forum Java Theory & Questions
    Replies: 1
    Last Post: July 14th, 2013, 06:08 AM
  2. How to Download a file via FTP
    By JavaPF in forum Java Networking Tutorials
    Replies: 1
    Last Post: December 24th, 2011, 11:56 AM
  3. Download a file to client from server
    By mvittalreddy in forum Java Networking
    Replies: 4
    Last Post: October 5th, 2009, 04:23 AM
  4. How to Download a file via FTP
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: June 5th, 2009, 05:49 AM
  5. Detecting File Download Completion
    By fedfan in forum JavaServer Pages: JSP & JSTL
    Replies: 4
    Last Post: June 5th, 2009, 04:27 AM

Tags for this Thread