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
and the error when you click on the link is The requested resource (/struts-blank/searchSupplyChainMMS/%5C%5C192.168.10.64%5CPublic%5CPCI%20Stock%20List%5Cstock_list.xls) is not available.
I know there is some silly logical error, but I could not figure it out. Can anyone pls tell me how to solve this problem
And ( If possible ) i. I need to open that excel file in a Excel Rather in IE ii. I also need to open in firefox
Joined: Mar 22, 2005
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 ]
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.