JSP调用无状态会话Bean——预定模块_book0.jsp

 <%@page import="java.sql.*"%>
<
%@page import="java.util.*"%>
<
%@page import="wanggsx.ejb.*"%>
<
%@page import="javax.naming.*"%>
<
%@page import="javax.rmi.PortableRemoteObject"%>
<%@ page contentType = "text/html;charset=gb2312"%>
<% request.setCharacterEncoding("gb2312"); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="15" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body bgcolor="#0000FF">
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" height="90" bgcolor="#0000FF">
  <tr>
  <td width="45%" height="90">
           <marquee οnmοuseοver=stop() οnmοuseοut=start() scrollAmount=3
            scrollDelay=100 direction=left height=100 width="100%" scrolltop="0" scrollleft="0";>
                <img src="images/5.jpg" width="150%" height="89"/>
      </marquee>
  </td>
  <td width="10%"><img src="images/66.jpg" height="89" width="80"></td>
  <td width="45%" height="90">
           <marquee οnmοuseοver=stop() οnmοuseοut=start() scrollAmount=3
            scrollDelay=100 direction=left height=100  width="100%"scrolltop="0" scrollright="0";>
               <img src="images/5.jpg" width="150%" height="89"/>
      </marquee>
  </td>
  </tr>
</table>
<table height="20" width="100%" cellpadding="0" cellspacing="0" bgcolor="#0000FF" align="center">
  <tr>
    <td width="44%" align="center"><a href="CreateBookuser0.jsp" name="create" title="请确认您要预订的房间类型和日期!" id="create"><font size="+2" color="#FFFF00"><b>预订请进</b></font></a>    </td>
    <td width="12%" align="center"><a href="Change_Booking.jsp" name="change_room" title="请确认您需要更换的是空房间!" id="change_room"><font color="#FFFF00" size="+2"><b>更改预订</b></font></a>    </td>
 <td width="25%" align="right"><a href="Quiz_Booking.jsp" name="quiz_booking" title="如果您对我们的服务有不满之处,请留下您的宝贵意见!谢谢合作!" id="quiz_booking"><font color="#FFFF00" size="+2"><b>取消预订</b></font></a>
 </td>
    <td align="right" width="19%"><input type="button" name="back" id="back" value="返回主页" onClick="javascript:history.go(-1)">    </td>
  </tr>
</table>
<% 
   int i;
   Hashtable ht=null;
   Vector vect = new Vector();
   String token="";
   int flag=0;
      try
       {
         InitialContext ctx = new InitialContext();
         Object ref = ctx.lookup("hotel");
         hotelHome home = (hotelHome)PortableRemoteObject.narrow(ref, hotelHome.class);
         hotel createRoom=home.create();
         vect=createRoom.FHotelRoomInfo();
       }
      catch(Exception ex)
       {
         System.out.println("ex is  "+ex);
       }   
   
%>
<table align="center" width="100%" cellpadding="0" cellspacing="0" border="2" bordercolor="#FF00FF" bgcolor="#00FF00">
   <tr bgcolor="#FFFF00">
                                       
        <th align="center"><font color="#0000FF">房间类型</font></th>
                          <th align="center"><font color="#0000FF">房间价格</font></th>
                          <th align="center"><font color="#0000FF">今天空房数</font></th>
                          <th align="center"><font color="#0000FF">明天空房数</font></th>
                          <th align="center"><font color="#0000FF">后天空房数</font></th>
                          <th align="center"><font color="#0000FF">大后天空房数</font></th>
                          <th align="center"><font color="#0000FF">公告信息</font></th>
 </tr>

<%
 if(vect.size()!=0)
 {
     for(i=0;i<vect.size();i++)
   {         
                ht = (Hashtable)vect.elementAt(i);
%>
        <tr>
           <td align="center"><%=ht.get("a")%></td>
                          <td align="center"><%=ht.get("b")%></td>
                          <td align="center"><%=ht.get("c")%></td>
           <td align="center"><%=ht.get("d")%></td>
                          <td align="center"><%=ht.get("e")%></td>
                          <td align="center"><%=ht.get("f")%></td>
                          <td align="center"><%=ht.get("g")%></td>
        </tr>
<%
        }
 }
 else
 {
%>
      未找到房间信息!
<%
     }
%>
               </table>
</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值