• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JSP Reload in opening attachment

Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
Posts: 9674
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
suchit pandya
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic