wood burning stoves 2.0*
The moose likes Servlets and the fly likes Servlet Streams Same File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Streams Same File" Watch "Servlet Streams Same File" New topic
Author

Servlet Streams Same File

Arumugam Av
Greenhorn

Joined: Sep 17, 2012
Posts: 2
Dear Friends,

Environment: Windows Vista 32bit, Glassfish2.1, JDK1.6.0.20

In my application, servlet, "SetFileName.java" sets value of "requestedFileName" of type String defined in SessionBean1. servlet,StreamFile.java, then stream the file requested in the newly opening window.

I am facing the following problem:

JSP has 2 checkboxes.

When the user checks first checkbox, Ajax request initiated and SetFileName.java sets requestedFileName="File1.pdf" StreamFile.java serves "File1.pdf" in the newly opening window.

When the user checks second checkbox, Ajax request initiated and SetFileName.java sets requestedFileName="File2.pdf". I am closing input,output streams in StreamFile.java. But, StreamFile.java still serves "File1.pdf" in the newly opening window.

Please help me resolve the issue.

Thanks in Advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Streams Same File
 
Similar Threads
Dynamic jasperReport on Single jsp
How can we use <jsp:scriptlet /> tag in jspx file that uses faclets
File Extenssion not showing in Mozilla
File download and request Forward
Jasper pdf in a new window and checkbox option in the pdf