I use the following code that is at the beginning of my
jsp to activate the download dialog box on my jsp I have this one page that will allow file downloads without having to go to another page:
Then I have several links displayed:
[code]
< a class="a" href="main.jsp?downfile=C:\\data\\<%=allfiles[i+1]%>">DOWNLOAD</a>
[code]
I know this isnt a secure way of doing this but I am on a intranet.
The problem I am having now is that when I click on one of the links and download the file and then open it, I get the contents of the file plus concatenated to the end of it is the first few HTML lines of the actual jsp that I downloaded the file from. Before I was just getting the first few lines of html from the jsp, not the actual contents of the downloaded file.
This is an example of what I am getting note this is the actual contents of a text file I download from my app:
This is the contents of the file that I downloaded.//This is where the file contents ends.
This is where the html code is appended.
Any ideas?
TIA!
BTW, I went to ApacheJServ because they wont let me use
tomcat