aspose file tools*
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Streams Same File" Watch "Servlet Streams Same File" New topic

Servlet Streams Same File

Arumugam Av

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

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

In my application, servlet, "" sets value of "requestedFileName" of type String defined in SessionBean1. servlet,, 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 sets requestedFileName="File1.pdf" serves "File1.pdf" in the newly opening window.

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

Please help me resolve the issue.

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