View RSS Feed

File

  1. How to write a Servlet that sends file to user to download

    by , 12-10-2011 at 04:54 AM
    Downloading files is a very popular task on the World Wide Web. Users click on a download link and the file gets downloaded into their computer. Technically, a download can be achieved by either of the two forms as following:

    • Direct link: the link points directly to a file on a server, for example: http://www.server.com/download/report.xls. This kind of link requires no additional effort on the server side, since the web server automatically hands the file over to users as
    ...
    Categories
    File , Servlet
  2. How to write a Servlet that uploads file to server

    by , 12-10-2011 at 04:19 AM
    Uploading files is a common operation for internet applications. Doing so in Java is pretty simple. This article will guide you through some steps to write a Java servlet that uploads a file then store it on the server.
    Before going on, this article assumes that you have some Java web development experience, you are be able to use Eclipse IDE to write the code and deploy a web application on Tomcat 6.0 server.
    The web application we are going to build contains the following components: ...
    Tags: file, servlet, upload Add / Edit Tags
    Categories
    Servlet , File