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.
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>
Joined: Sep 14, 2005
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?
Joined: Apr 14, 2005
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.