Forums Register Login

JSP Reload in opening attachment

+Pie Number of slices to send: Send
Hi,

In one appliation i am facing a criticle problem. all attachements attached with document are displayed in one frame of JSP(there is a main JP and 3 frames in side it for 3 different type of information). When user click on name request goes on server, it return with data (stored in blob field in database) on main jsp by request. Then on main page data is being set in session. In frame page after taking data from session by session.getattribute i remove it from session and writes it in outputstream object and File download box comes with option open/save/cancel. on clicking open attachment opens.

This works fine here at my local server and testing server properly for all type of attachment. At client side on testing server it works fine for doc,txt,pdf but for ppt,pptx and docx, after clicking on OPEN or SAVE in file download box, internal frame page reloads again and it tries to get data from session again but as first time data is been removed from session it shows "No attachment Found".

How it can be possible?? Is it possible that this problem is dew to any browser settings or server settings?
We use IE 7 browser. Here is the code of inner frame JSP.








I am getting all file name / content type proprrly first time. No request submmited at server when this JSP reloads.

Thanks in advance.
+Pie Number of slices to send: Send
It is not very clear to me what you are trying to do, but it looks like a design flaw in the application. You are using a lot of scriptlet code in your JSPs which is not good. Putting full data of files in session might slow down your application. Can you please tell us how the file's data got into the session i.e. where and when did you read it from the database. What are you actually trying to achieve here?? We might be able to give you a better way to solve the problem...
+Pie Number of slices to send: Send
Actually This page is included in another JSP as frame. In that Data is coming in request but request is not accessable in this frame page so i have to write data in session.

When user clicks on Attachment name I neeed to read it.
In main JSP it is been called like.

Oh the stink of it! Smell my tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2370 times.
Similar Threads
Upload Download File
Jsp to Excel
HttpIOException: Software caused connection abort: socket write error
.pptx and .docx problem
problem in opening office 2007 document in JSP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:58:54.