页面1 String roomId = request.getParameter("h_name");select去不出值为什么啊?
<body>
<%
String c_name = request.getParameter("c_name");
String IDcard = request.getParameter("IDcard");
// List allHouseType = DaoFactory.getHouseDaoInstance().getAll(0,DaoFactory.getHouseDaoInstance().getTotulRows(null,null,null),null,null,null);
List allHouseType=DaoFactory.getHouseDaoInstance().getAllhouseType();
%>
<h2 ><font color="#004080">添加客户订房信息</font></h2>
<hr color="#3366FF" />
<center><font color="red">第二步:选择客房类型</font></center>
<form action="./customer/customer_3.jsp" method="post" name="form" onsubmit="return check()">
<table width="500" border="1" bordercolor="#0033FF" align="center">
<tr>
<td height="50">选择房间类型</td>
<td align="left" height="50">
<select name="h_name" id="h_name">
<option value="">请选择房间类型</option>
<%
Iterator itor = allHouseType.iterator();
while(itor.hasNext()){
House d = (House)itor.next();
%>
<option value="<%=d.getId() %>"><%=d.getHouseType() %></option>
<%
}
%>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input name="submit" type="submit" value="下一步" /></td>
</tr>
</table>
<input name="c_name" type="hidden" value="<%=c_name %>">
<input name="IDcard" type="hidden" value="<%=IDcard %>">
</form>
</body>
</html>-------------------------------------------------------------------------------------------页面2
<body>
<%
String c_name = request.getParameter("c_name");
String IDcard = request.getParameter("IDcard");
String roomId = request.getParameter("h_name");
// int h_id = Integer.parseInt(roomId);
House h = DaoFactory.getHouseDaoInstance().getHouseById(roomId);
String h_no[] = DaoFactory.getHouseDaoInstance().getRoomNo(roomId);
%>
<h2 ><font color="#004080">添加客户订房信息<%out.print(roomId);%><%out.print(c_name);%></font></h2>
<hr color="#3366FF" />
<center><font color="red">第三步:选择客房号</font></center>
<form action="./customer/customer_4.jsp" method="post" name="form" onsubmit="return check()">
<table width="500" border="1" bordercolor="#0033FF" align="center">
<tr>
<td>选择房间号</td>
<td align="left">
您选择的房间类型是:<font color="red"><%=h.getHouseType() %></font>
请您选择<font color="red"><%=h.getHouseType() %></font>对应的房间号<hr color="red"/>
<select name="h_no">
<option value="">请您选择房间编号</option>
<%
for(int i = 0 ; i<h_no.length; i++){
%>
<option value="<%=h_no[i] %>"> <%=h_no[i] %> </option>
<%
}
%>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input name="submit" type="submit" value="下一步" /></td>
</tr>
</table>
<input name="c_name" type="hidden" value="<%=c_name %>">
<input name="IDcard" type="hidden" value="<%=IDcard %>">
<input name="roomId" type="hidden" value="<%=roomId %>">
</form>
</body>
</html>
<body>
<%
String c_name = request.getParameter("c_name");
String IDcard = request.getParameter("IDcard");
// List allHouseType = DaoFactory.getHouseDaoInstance().getAll(0,DaoFactory.getHouseDaoInstance().getTotulRows(null,null,null),null,null,null);
List allHouseType=DaoFactory.getHouseDaoInstance().getAllhouseType();
%>
<h2 ><font color="#004080">添加客户订房信息</font></h2>
<hr color="#3366FF" />
<center><font color="red">第二步:选择客房类型</font></center>
<form action="./customer/customer_3.jsp" method="post" name="form" onsubmit="return check()">
<table width="500" border="1" bordercolor="#0033FF" align="center">
<tr>
<td height="50">选择房间类型</td>
<td align="left" height="50">
<select name="h_name" id="h_name">
<option value="">请选择房间类型</option>
<%
Iterator itor = allHouseType.iterator();
while(itor.hasNext()){
House d = (House)itor.next();
%>
<option value="<%=d.getId() %>"><%=d.getHouseType() %></option>
<%
}
%>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input name="submit" type="submit" value="下一步" /></td>
</tr>
</table>
<input name="c_name" type="hidden" value="<%=c_name %>">
<input name="IDcard" type="hidden" value="<%=IDcard %>">
</form>
</body>
</html>-------------------------------------------------------------------------------------------页面2
<body>
<%
String c_name = request.getParameter("c_name");
String IDcard = request.getParameter("IDcard");
String roomId = request.getParameter("h_name");
// int h_id = Integer.parseInt(roomId);
House h = DaoFactory.getHouseDaoInstance().getHouseById(roomId);
String h_no[] = DaoFactory.getHouseDaoInstance().getRoomNo(roomId);
%>
<h2 ><font color="#004080">添加客户订房信息<%out.print(roomId);%><%out.print(c_name);%></font></h2>
<hr color="#3366FF" />
<center><font color="red">第三步:选择客房号</font></center>
<form action="./customer/customer_4.jsp" method="post" name="form" onsubmit="return check()">
<table width="500" border="1" bordercolor="#0033FF" align="center">
<tr>
<td>选择房间号</td>
<td align="left">
您选择的房间类型是:<font color="red"><%=h.getHouseType() %></font>
请您选择<font color="red"><%=h.getHouseType() %></font>对应的房间号<hr color="red"/>
<select name="h_no">
<option value="">请您选择房间编号</option>
<%
for(int i = 0 ; i<h_no.length; i++){
%>
<option value="<%=h_no[i] %>"> <%=h_no[i] %> </option>
<%
}
%>
</select>
</td>
</tr>
<tr>
<td colspan="2"><input name="submit" type="submit" value="下一步" /></td>
</tr>
</table>
<input name="c_name" type="hidden" value="<%=c_name %>">
<input name="IDcard" type="hidden" value="<%=IDcard %>">
<input name="roomId" type="hidden" value="<%=roomId %>">
</form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货