You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mary Hill <ma...@umich.edu> on 2001/03/01 21:51:16 UTC

Help with Frames

I must be missing something simple.  I have a jsp page which references
a set of frames.  Each frame has a jsp file which contains references to
struts tages.  The struts tags fail and I get exceptions - such as bean
does not exist, iterate tag is null....

The jsp pages work fine when not used as part fo the frame.  It is like
it is losing the session information.

the main jsp page has the following contents:

<%@ page language="java" errorPage="error.jsp" %>
<%@ taglib uri="/struts-bean.tld" prefix="sbean" %>
<%@ taglib uri="/struts-form.tld" prefix="sform" %>
<%@ taglib uri="/struts-logic.tld" prefix="slogic" %>
<%@ taglib uri="/struts-html.tld" prefix="shtml" %>
<%@ taglib uri="/umms.tld" prefix="umms" %>
<umms:checkLogon/>
<html>
<FRAMESET cols="20%,*">
        <FRAME SRC="reportList.jsp" name="REPORTLIST">
        <FRAME SRC="blankpage.jsp" name="REPORT">
</FRAMESET>
</html>

-------------------------------------------------------------------------------------

reportList.jsp has  the following contents:

<%@ page language="java" %>
<%@ taglib uri="/struts-bean.tld" prefix="sbean" %>
<%@ taglib uri="/struts-form.tld" prefix="sform" %>
<%@ taglib uri="/struts-logic.tld" prefix="slogic" %>
<%@ taglib uri="/struts-html.tld" prefix="shtml" %>
<%@ taglib uri="/umms.tld" prefix="umms" %>
<html>
<body>

<sform:errors/>

<h3 align="center">
Select a Report: </br>
<ul>
<slogic:iterate id="report" name ="reportForm" property="reportList"
type ="edu.umich.umms.dreams.Report">

      <li><a href=report.do?rptCd=<sbean:write name="report" property
="rptCd"/> ><sbean:write name="report" property ="rptDes"/></a>
      </li>

</slogic:iterate>
</ul>
</h3>
</body>
</html>
---------------------------------------------------------------------------------

The above jsp fails because the iterate doStartTag returns null.

What am I doing wrong?

RE: Help with Frames

Posted by Abraham Kang <ab...@infogain.com>.
Mary,

The problem is the initial <FRAMESET> sent to the browser forces the browser
to initiate seperate requests
to fill in the frames of the page.  You might want to store and retrieve the
objects in the session scope or
have each frame call a *.do (reportList.do?neededParam=value) to set up the
request objects needed by the tags.

Hope this helps,
Abraham

> -----Original Message-----
> From: Mary Hill [mailto:maryhill@umich.edu]
> Sent: Thursday, March 01, 2001 12:51 PM
> To: Struts User
> Subject: Help with Frames
>
>
> I must be missing something simple.  I have a jsp page which references
> a set of frames.  Each frame has a jsp file which contains references to
> struts tages.  The struts tags fail and I get exceptions - such as bean
> does not exist, iterate tag is null....
>
> The jsp pages work fine when not used as part fo the frame.  It is like
> it is losing the session information.
>
> the main jsp page has the following contents:
>
> <%@ page language="java" errorPage="error.jsp" %>
> <%@ taglib uri="/struts-bean.tld" prefix="sbean" %>
> <%@ taglib uri="/struts-form.tld" prefix="sform" %>
> <%@ taglib uri="/struts-logic.tld" prefix="slogic" %>
> <%@ taglib uri="/struts-html.tld" prefix="shtml" %>
> <%@ taglib uri="/umms.tld" prefix="umms" %>
> <umms:checkLogon/>
> <html>
> <FRAMESET cols="20%,*">
>         <FRAME SRC="reportList.jsp" name="REPORTLIST">
>         <FRAME SRC="blankpage.jsp" name="REPORT">
> </FRAMESET>
> </html>
>
> ------------------------------------------------------------------
> -------------------
>
> reportList.jsp has  the following contents:
>
> <%@ page language="java" %>
> <%@ taglib uri="/struts-bean.tld" prefix="sbean" %>
> <%@ taglib uri="/struts-form.tld" prefix="sform" %>
> <%@ taglib uri="/struts-logic.tld" prefix="slogic" %>
> <%@ taglib uri="/struts-html.tld" prefix="shtml" %>
> <%@ taglib uri="/umms.tld" prefix="umms" %>
> <html>
> <body>
>
> <sform:errors/>
>
> <h3 align="center">
> Select a Report: </br>
> <ul>
> <slogic:iterate id="report" name ="reportForm" property="reportList"
> type ="edu.umich.umms.dreams.Report">
>
>       <li><a href=report.do?rptCd=<sbean:write name="report" property
> ="rptCd"/> ><sbean:write name="report" property ="rptDes"/></a>
>       </li>
>
> </slogic:iterate>
> </ul>
> </h3>
> </body>
> </html>
> ------------------------------------------------------------------
> ---------------
>
> The above jsp fails because the iterate doStartTag returns null.
>
> What am I doing wrong?
>