> 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 on disk)
If you don't mind providing direct access to the downloadable area, one easy way to provide this is to place a <Context> element in conf/Catalina/[host]/[dlink].xml, where [dlink] is the URL link you want for the downloadable files. Within the <Context> element, place a docBase attribute that points to the directory that downloads occur from. No programming required. For example, if using the default <Host> element and the downloadable files are in /usr/myName/downloads and you want the URL pattern for accessing these to be http://myhost.com/files/*.*, your <Context> element would look like this: <Context docBase="/usr/myName/downloads"/> and it would be placed in conf/Catalina/localhost/files.xml. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org