I have a text file and want to download it. I am working in localhost. The HTML page from which I am downloading file, is called from localhost:8080. And the file which I want to download, I am calling using another port i.e. 'localhost:100'.
If I do like this I am not getting that particular txt file, in fact the whole location of the of the folder is getting downloaded in HTML format. How to resolve this issue ?
But when the port is same for both HTML and the download URL , that particular text file is getting downloaded.
HTML Page (http://localhost:8080/project/test.html)
When this runs following file gets downloaded -
In download.html there is
Index of /test
The localhost:8080 is Jetty Server and localhost:100 is Apache Server