• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I frame not displaying blob (document) from action class

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,


I have an iframe in a jsp class which is calling a struts2 action class in its src, but instead of opening inside the frame the file is getting downloaded,

Inside file TempContentPage.jsp:



Here is the execute method in the action class ContentPage.java



And here is the struts.xml mapping



I want to open the file inside the iframe scope, Please help me out .

Thanks, Aditya
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Aditya Raghu wrote:
I want to open the file inside the iframe scope, Please help me out .



I don't remember whether Firefox is able to embed MS Word inside an iframe, maybe this is possible only in IE.
 
Aditya Raghu
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried in ie too, even there the file is being downloaded. Do you see any other way of passing the stream to iframe? Is there any other alternative to this?


Thanks,
Aditya
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that you're not using Struts' stream result correctly, instead of providing an InputStream and have the framework stream it to the client you're writing it directly to the servlet's output stream (is res the ServletResponse?). Take a look at the docs and fix it. Nevertheless, I don't think that this will solve your problem...
 
Aditya Raghu
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Lorand. Will look at it:)



Aditya
 
reply
    Bookmark Topic Watch Topic
  • New Topic