网页代码
--- <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;
}问题: 怎么读不页面的日期的数据?
--- <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;
}问题: 怎么读不页面的日期的数据?
解决方案 »
- 关于HibernateTemplate的一个问题!!!!在线等~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 【问题】jsf框架如何使用jQuery啊?
- 下面这个例子如何体现List集合的有序性?
- struts的复选框html:multibox的问题
- 搞过自动生成class文件的进
- struts例子问题
- 几个新手菜鸟问题 请各位帮忙!!!!
- ejb能做的东西, 用servlet+javabean不也能做吗? 为什么还要用ejb?
- 有个复杂的问题咨询大家,如果不忙的可以进来看看!
- 那位大哥可以给我一个Java Client调用.NET(或者别的语言)的WebService的例子!!!!
- Criteria的returnMaps()怎么没有了
- 请求帮忙Struts1的问题
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 标签有没有错?
你的值从哪获取?