you can. for instance,
File file = new File("C:\\temp\\downloadfilename.csv"); FileInputStream fileIn = new FileInputStream(file); ServletOutputStream out = response.getOutputStream(); byte[] outputByte = new byte[4096]; //copy binary contect to output stream while(fileIn.read(outputByte, 0, 4096) != -1) { out.write(outputByte, 0, 4096); } fileIn.close(); On Tue, Jul 21, 2009 at 2:54 PM, Ritesh399 <ritesh...@gmail.com> wrote: > > Hi all > I am developing a web application using jsp and want to provide some links > for a user to download data. The data is not in web application's > directory(somewhere else on disk) > Can I provide a direct link to that data file ? > > > > Thanks > Ritesh > -- > View this message in context: > http://www.nabble.com/providing-downloading-functionality-for-a-file-which-is-on-disk-tp24582115p24582115.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >