This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes Frames & Struts - How to? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Frames & Struts - How to?" Watch "Frames & Struts - How to?" New topic

Frames & Struts - How to?

Johann Evans
Ranch Hand

Joined: Nov 18, 2002
Posts: 47
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

Joined: Jun 11, 2002
Posts: 104
I too have had the same problem getting started with Struts. I'll watch this thread with interest!
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Try adding <html:base/> to your page.

Matthew Phillips

Joined: Feb 25, 2002
Posts: 20
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

Joined: Nov 18, 2002
Posts: 47
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!
I agree. Here's the link:
subject: Frames & Struts - How to?
It's not a secret anymore!