This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes Using a JSP as source for an iframe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Using a JSP as source for an iframe" Watch "Using a JSP as source for an iframe" New topic

Using a JSP as source for an iframe

James Treacy

Joined: Oct 08, 2004
Posts: 2
Hello there,

I wonder if anyone could help me with a problem with JSPs in iframes.

I've got a Struts web app where one JSP contains an iframe whose source comes from some raw XML data, representing a report, processed into HTML with XSLT.

Currently everytime the page is accessed I write the processed XML to HTML files which are then used to provide the source for the iframe.

All well and good except that this leads to a build-up of HTML files on the server-side and I'm worried that there maybe concurrency issues when 2 or more users access the same report at the same time.

So ideally I'd like to use a JSP as the source for the iframe, so that when the XML is returned by the Struts action class the JSP can process the XML with XSLT and write it out with pageContext().getOut().

However when I've tried this I find that the actionForward object takes you to the iframe source JSP but the iframe itself is gone, so I can't scroll the content.

I apologise for the rather convoluted description, I'd be glad to hear any ideas you might have,

thanks a lot

I agree. Here's the link:
subject: Using a JSP as source for an iframe