aspose file tools*
The moose likes Struts and the fly likes Framesets and Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Framesets and Struts" Watch "Framesets and Struts" New topic
Author

Framesets and Struts

Aash Patel
Greenhorn

Joined: Sep 14, 2005
Posts: 24
I'm trying to design a help page for my web application. I considered using framesets and frames to design the page. When I try to open the frameset (help.htm) in my application, it doesn't load the frames. I'm assuming this is because the <frame src="..."> required a relative path. Correct?

How can I work around this? I even tried this <html:frame page="..."> but to no avail.

Any other suggestions most welcome too.

Thanks.
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
frame src doesn't require relative path, it requires a CORRECT path. you can used fixed fully qualified URL, as long as the spellings to the URL is correct. you can use relative URL as long as the relative path is properly defined.

generally, i prefer to refer to files and resources by '/' + 'application context root' + URI. if you have a 'help/frame1.do' defined in your struts config, your reference should be '/myapp/help/frame1.do'.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Aash Patel
Greenhorn

Joined: Sep 14, 2005
Posts: 24
Thanks for your reply alan. While I was researching other ways to implement my help pages, I came across the use of tiles. So I implemented one page using tiles in Struts. Is there any advantage of using one over the other? Especially when designing help pages?
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
tiles and frames are independent of each other. tiles is used for laying out the page and cannot be used like frame or iframe, that is you cannot have 1 part of the page refreshing another part of the page like frames; instead, you must go back to the server and recontruct the tiles. you can certainly place tiles inside frames, but not the other way around.

tiles is very nice if you are using struts. they are best used via tiles definition (tiles-def.xml) so they can be easily called by the actions via the forward mappings. there are quite a few tutorials out there on this subject.
 
 
subject: Framesets and Struts