Hi.
I have an application which I deploy as a WAR file (JUCK.WAR). In the flow of execution, there comes a time when my application needs to create a file and write data to it so that the user can download the file at will.
I am creating the file in applications/CE/Files/Download, applications being the default "applications" directory in WebLogic 6.1.
When the user wants to download the file, I verify that it exists, and if true redirect to a
JSP where there is a link to that file.
I am writing the link as /CE/Files/Download/DesiredFile but when I try to download it, I get a 400 - Not Found Error, saying that it could not find anything matching the request, even though I know for sure that the file exists and that the link is well writen.
I have also tried to use servletContext.getRealPath("/CE/Files/Download/DesiredFile") , but I found out that it only works for files in the WAR file, not files in external directories.
How can I write the URL so that the file can be, in fact, downloaded? I am positive that this can be done...
Thanks everybody.