I have a problem. In a jsp file, I just need to put an link for a file path ( Which is stored in a different system from the webserver ) I have seen some of the examples in this forum,but I could not solve the issue.
<% ...... ...... ...... %> <td align="left" colspan = 0><b><font color=#1E2582><a href="\\192.168.10.64\Public\PCI Stock List\stock_list.xls"> Click Here To Access The File</a></font></td> <% ...... ...... ...... %>
When the jsp file is compiled and the output displayed as below, Stock List Report Successfully, Saved in - P:\PCI Stock List\stock_list.xls Click Here To Access The File
Any file you want to downlaod via HTTP needs to be in a publicy accessible directory on that server. A file on a shared drive somewhere else may work if it is mapped to a web directory, but I'm not sure of that. But just any shared directory will not work - it needs to be in the web directory space. [ December 06, 2006: Message edited by: Ulf Dittmer ]
Joined: Mar 24, 2005
Hi Ulf Dittmer, There must be a way to access the file on other network directory..
So you want to produce an href link to a file that's in a different server. Well, first of all that different server must be running a web server so that it can respond to HTTP requests for files. Second that web server must be configured so that it can serve that file to requests; you can't just point at files over there and hope that the web server understand what you mean, you have to provide the URL that the web server will understand.
And third, backslashes aren't valid characters in URLs.