struts <bean help

Discussion in 'Java' started by MileHighCelt, Dec 15, 2005.

  1. MileHighCelt

    MileHighCelt Guest

    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,
     
    MileHighCelt, Dec 15, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Benjamin Stewart

    To bean or not to bean...

    Benjamin Stewart, Jun 30, 2003, in forum: Java
    Replies:
    0
    Views:
    830
    Benjamin Stewart
    Jun 30, 2003
  2. David Thielen
    Replies:
    2
    Views:
    837
    Marek Lange
    Sep 12, 2003
  3. Takeshi
    Replies:
    0
    Views:
    549
    Takeshi
    Jan 28, 2004
  4. Thomas P. Fuller
    Replies:
    1
    Views:
    4,636
    bitbucket43
    Aug 17, 2004
  5. jill
    Replies:
    5
    Views:
    15,878
Loading...

Share This Page