File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts iFrame security workaround - problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts iFrame security workaround - problems" Watch "Struts iFrame security workaround - problems" New topic

Struts iFrame security workaround - problems

Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
Since you cannot access the properties of an iFrame if the content does not come from the same domain I was trying to find a workaround.

So I'm referencing an action in the iframe instead of a page:

Using the following action:

It's like it is not escaping all the characters properly. At the top of my iframe I see "html>" and some other scattered characters. Can any of you see a major flaw in my logic? Obviously I'm going to have to parse out all the local variables and define their entire path, but my first step is to figure out why it is hosing the html.
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
nm, I got it. had to use BufferedStreams.
Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Just a little tip. Don't use IFrames. works well in IE but a mess in safari on mac. Use Layer/div if you can.

I agree. Here's the link:
subject: Struts iFrame security workaround - problems
Similar Threads
Save Dialog in JSF Portlet
Display Image in JSP using servlet
Call to JSF experts
Help in reading from a file:// url
response.setHeader() not working in JSF portlet