网页代码
--- <input name="year" type="text" size="5" />
                             <label>年</label>
                            <select id="month" name="month" title="月">
           </select><label for="month">月</label>
   <select name="day">另一个jsp页面代码
----
<jsp:useBean id="tea" scope="request" class="teacher.teacher" /><jsp:setProperty name="tea" property="tea_birthday" />
teacher类代码/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */package teacher;/**
 *
 * @author admin
 */
public class teacher {   
    public String getDay() {
        return day;
    }    public void setDay(String day) {
        this.day = day;
    }    
    public String getMonth() {
        return month;
    }    public void setMonth(String month) {
        this.month = month;
        System.out.print(this.month);
    }
     public String getTea_birthday() {
        return tea_birthday;
    }    public void setTea_birthday() {
        this.tea_birthday=this.getYear()+"-"+this.getMonth()+"-"+this.getDay();
    }    public String getTea_depno() {
        return tea_depno;
    }    public void setTea_depno(String tea_depno) {
        this.tea_depno = tea_depno;
    }   
 
    public String getYear() {
        return year;
    }    public void setYear(String year) {
        this.year = year;
    }
    private String tea_no;
    private String roomno;
private String tea_name;
private String tea_sex;
private String tea_plity;
private String tea_birthday;
private String tea_idno;
private String tea_tel;
private String tea_jiguan;
private String tea_photo;
    private String tea_depno;
private int bed_no;
private String tea_inroomdate;
    private String tea_outroomdate;
    private String inroomlimit;
    private String re;
    private String year;
    private String month;
    private String day;
}问题:   怎么读不页面的日期的数据?

解决方案 »

  1.   

    jsp:setProperty 应该是jsp:getProperty把
      

  2.   

    <%-- 
        Document   : accteacher
        Created on : 2009-6-19, 17:01:43
        Author     : admin
    --%><%@page contentType="text/html" pageEncoding="UTF-8"%>
    <jsp:useBean id="tea" scope="request" class="teacher.teacher" />
    <jsp:useBean id="teabookin" scope="request" class="teacher.TeaBookIn" />
    <jsp:useBean id="db" scope="request" class="db.DBConnect" />
    <jsp:setProperty name="tea" property="bed_no" />
    <jsp:setProperty name="tea" property="re"  />
    <jsp:setProperty name="tea" property="roomno"  />
    <jsp:setProperty name="tea" property="tea_birthday" />
    <jsp:setProperty name="tea" property="tea_idno" />
    <jsp:setProperty name="tea" property="tea_inroomdate"  >
    <jsp:setProperty name="tea" property="year"  />
    <jsp:setProperty name="tea" property="month"/>
    <jsp:setProperty name="tea" property="day"/>
    </jsp:setProperty>
    <jsp:setProperty name="tea" property="tea_jiguan"  />
    <jsp:setProperty name="tea" property="tea_name" />
    <jsp:setProperty name="tea" property="tea_no"/>
    <jsp:setProperty name="tea" property="tea_outroomdate" />
    <jsp:setProperty name="tea" property="tea_plity"  />
    <jsp:setProperty name="tea" property="tea_sex" />
    <jsp:setProperty name="tea" property="tea_tel"/>
    <jsp:setProperty name="tea" property="inroomlimit" />
    <jsp:getProperty name="tea" property="tea_no" />
    <jsp:getProperty name="tea" property="inroomlimit" />
    <jsp:getProperty name="tea" property="year" />
    <jsp:getProperty name="tea" property="month" />
    <jsp:getProperty name="tea" property="day" />大家看一下,我这使用 jsp 的javabean 标签有没有错?
      

  3.   

    我有指定setProperty 中的value 或Parm属性吗。
    你的值从哪获取?