File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Streams Same File

 
Arumugam Av
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic