struts <bean help

M

MileHighCelt

I would really appreciate any help you can offer on this Struts 1.1
question. I have an ActionForm that contains a bean and the getters
and setters to get it:

<-- class declaration etc)
private ReportBean report;

public ReportBean getReport() {
return report;
}


public void setReport(ReportBean report) {
this.report = report;
}

I put that ActionForm in the session in the Action so that my jsp can
get the form, and then the bean on it. I don't need to iterate over
the bean, it is a one-one mapping for my jsp, but I cannot find any
examples on how to do this. Here is what I have in my jsp so far and
not really sure where to turn:

<%@ taglib uri="/WEB-INF/lib/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/lib//struts-html.tld" prefix="html" %>

<jsp:useBean id="uploadRecords" name="reportform"
class="com.xxx.struts.form.DataReportsForm" scope="request"/>
<do I declare the bean from the formsomehow like
jsp:reportBean name="report" type="com.xxx.struts.form.ReportBean"..?

Now that I have the form from the session, I want to get the reportBean
from the form
<td> <bean:write name="report" property="field1" </td>
<td> <bean:write name="report" property="field2" </td>

I don't know why I can find the solution to this, but I would really
appreciate any advice or direction to a good online source that will
show me how.

thank you,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,692
Latest member
JenniferTi

Latest Threads

Top