JSP调用无状态会话Bean——预定模块_book_success1.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"%>

<html>
<head>
<title></title>
</head>
<body bgcolor="#00FF00">

<% 
   String id="";
   String email="";
   String tel="";
   String booksum1="";
   String bookdate1="";
   String bookroomtype="";
   String roomtype1="";
   String oldsum1="";
  
   id=request.getParameter("id"); 
   byte a[]=id.getBytes("ISO-8859-1");
   id=new String(a);
   email=request.getParameter("email"); 
   byte b[]=email.getBytes("ISO-8859-1");
   email=new String(b);
   tel=request.getParameter("tel"); 
   byte c[]=tel.getBytes("ISO-8859-1");
   tel=new String(c);
   booksum1=request.getParameter("booksum"); 
   byte d[]=booksum1.getBytes("ISO-8859-1");
   booksum1=new String(d);
   bookroomtype=request.getParameter("bookroomtype"); 
   byte e[]=bookroomtype.getBytes("ISO-8859-1");
   bookroomtype=new String(e);
   bookdate1=request.getParameter("bookdate"); 
   byte f[]=bookdate1.getBytes("ISO-8859-1");
   bookdate1=new String(f);
   oldsum1=request.getParameter("oldsum"); 
   byte g[]=oldsum1.getBytes("ISO-8859-1");
   oldsum1=new String(g);
   roomtype1=request.getParameter("roomtype"); 
   byte h[]=roomtype1.getBytes("ISO-8859-1");
   roomtype1=new String(h);

   int i;
   Hashtable ht=null;
   Vector vect = new Vector();
   String token="";
   int flag2=0;
      try
       {
         InitialContext ctx = new InitialContext();
         Object ref = ctx.lookup("hotel");
         hotelHome home = (hotelHome)PortableRemoteObject.narrow(ref, hotelHome.class);
         hotel createbookuser=home.create();
   flag2=createbookuser.MRoomInfoNO(bookdate1,oldsum1,booksum1,roomtype1);
       }
      catch(Exception ex)
       {
         System.out.println("ex is  "+ex);
       }   
   
%>
<%
if(flag2==1)
{
%>
<form action="book_success.jsp">
<input type="hidden" name="id" value="<%=id%>">
<input type="hidden" name="email" value="<%=email%>">
<input type="hidden" name="tel" value="<%=tel%>">
<input type="hidden" name="booksum" value="<%=booksum1%>">
<input type="hidden" name="bookdate" value="<%=bookdate1%>">
<input type="hidden" name="bookroomtype" value="<%=bookroomtype%>">
<input type="submit" value="最后确认">
</form>
<%
}else{
%>
<jsp:forward page="CreateBookuser.jsp"></jsp:forward>
<%
   }
%>

</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值