• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Frames & Struts - How to?

 
Johann Evans
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm rather new to Struts and would like to know how can I go about on my index.jsp page to put frames - because if I add frames, it seems the pages in the frames does not get displayed? I simply have a URL to them in the frame eg. <frame name="main" src="/welcome.jsp" marginwidth="0" marginheight="0" scrolling="auto" noresize target="_self">
But the index.jsp does not open the welcome.jsp page. Must I map an action or how can I have it allow the frame to go through?
I used the struts-blank template to start the project.
 
Lanny Gilbert
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too have had the same problem getting started with Struts. I'll watch this thread with interest!
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try adding <html:base/> to your page.
 
smercmu
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The html frame/frameset tag is independent of the struts taglibs and framework. Does the frame tag work if you were to just have the frameset in a plain html file? My guess is that it does not. Try removing the "/" in front of the welcome.jsp src property. That will probably do the trick if you have the frameset set up correctly.
Hope that helps....
 
Johann Evans
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx 4 all the replies - I checked each one.
My problem came down to myself actually:
The struts-blank has a section for <logic:notPresent> and this required a body tag surrounding it, which in turn caused the frameset tag not to render, because the page already contained a body part. Took the <logic... part out and now it works. Will just move the body tags to be inside the <logic:notPresent> tag. This should then work for frames!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic