Re: providing downloading functionality for a file which is on disk

2009-07-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lanxiazhi, On 7/21/2009 7:52 AM, lanxiazhi wrote: > I don't have a linux at hand to prove this idea: > if you're deploy your app in linux ,maybe you can use a soft link to that > directory ,and put the link under your webapp's dir. > hope that will he

RE: providing downloading functionality for a file which is on disk

2009-07-21 Thread Caldarale, Charles R
> From: Michael Ludwig [mailto:m...@as-guides.com] > Subject: Re: providing downloading functionality for a file which is on > disk > > Is there a way of including a second context with a web > application in a similarly convenient way? No. The servlet spec expects webapps to

Re: providing downloading functionality for a file which is on disk

2009-07-21 Thread Michael Ludwig
Caldarale, Charles R schrieb: If you don't mind providing direct access to the downloadable area, one easy way to provide this is to place a element in conf/Catalina/[host]/[dlink].xml, where [dlink] is the URL link you want for the downloadable files. Within the element, place a docBase attr

RE: providing downloading functionality for a file which is on disk

2009-07-21 Thread Caldarale, Charles R
> From: Ritesh399 [mailto:ritesh...@gmail.com] > Subject: providing downloading functionality for a file which is on > disk > > 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

Re: providing downloading functionality for a file which is on disk

2009-07-21 Thread lanxiazhi
I don't have a linux at hand to prove this idea: if you're deploy your app in linux ,maybe you can use a soft link to that directory ,and put the link under your webapp's dir. hope that will help. thanks. lanxiazhi 2009/7/21 Kham Mulman > you can. > > for instance, > > File file = new File("C:\\t

Re: providing downloading functionality for a file which is on disk

2009-07-20 Thread Kham Mulman
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, 409