📄 regist_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import myhotel.MyConn;
public final class regist_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<title>饭店前台登记系统</title>\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write(".style1 {\r\n");
out.write("\tfont-size: 24px;\r\n");
out.write("\tcolor: #000000;\r\n");
out.write("\tfont-weight: bold;\r\n");
out.write("}\r\n");
out.write(".style3 {font-size: 16px}\r\n");
out.write("body {\r\n");
out.write("\tbackground-image: url();\r\n");
out.write("}\r\n");
out.write(".STYLE4 {\r\n");
out.write("\tfont-size: 36px;\r\n");
out.write("\tfont-family: \"隶书\";\r\n");
out.write("}\r\n");
out.write(".STYLE5 {font-size: 24px}\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write(" \r\n");
out.write("</head>\r\n");
out.write("\r\n");
out.write("<body>\r\n");
out.write(" <form name=\"form1\" method=\"post\" action=\"index.jsp\">\r\n");
out.write(" <input type=\"submit\" name=\"Submit4\" value=\" 返回首页 \">\r\n");
out.write(" </form>\r\n");
out.write("<p> </p>\r\n");
out.write("<table width=\"508\" height=\"294\" border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#0000CC\" bgcolor=\"#FFFFFF\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"168\" height=\"43\" bgcolor=\"#0066CC\"><p align=\"center\"><br>\r\n");
out.write(" </p></td>\r\n");
out.write(" <td width=\"162\"><div align=\"center\"><span class=\"STYLE5\"> 全部房类详情</span></div></td>\r\n");
out.write(" <td width=\"170\" bgcolor=\"#0066CC\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" \r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"194\" colspan=\"3\"><p>房间详细说明:</p>\r\n");
out.write(" <table width=\"100%\" border=\"1\" cellspacing=\"1\" cellpadding=\"1\" align=\"center\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=10% align=center>类型</td>\r\n");
out.write(" <td width=10% align=center>床位数</td>\r\n");
out.write(" <td width=10% align=center>房价</td>\r\n");
out.write(" <td width=25% align=center>备注</td>\r\n");
out.write(" <td width=10% align=center>总房数</td>\r\n");
out.write(" <td width=15% align=center>可租床位数</td>\r\n");
out.write(" </tr>\r\n");
out.write(" \r\n");
out.write(" \t\t");
String sql="select count(*) as rentable from room where roomcode='0001';";
MyConn conn=new MyConn();
ResultSet rs=conn.executeQuery("select * from roomclass");
while(rs.next()){
out.write("\r\n");
out.write(" \t\t\t\t<tr>\r\n");
out.write(" \t\t\t\t \t");
String temp= String.valueOf(rs.getString(2));
String str="豪华";
if(temp.compareTo(str)==0){
}
out.write("\r\n");
out.write(" \t\t\t\t <td width=10% align=center>");
out.print(temp);
out.write("</td>\r\n");
out.write(" \t\t\t\r\n");
out.write(" <td width=10% align=center>");
out.print(rs.getObject(3));
out.write("</td>\r\n");
out.write(" <td width=10% align=center>");
out.print(rs.getObject(4));
out.write("</td>\r\n");
out.write(" <td width=25% align=center>");
out.print(rs.getObject(5));
out.write("</td>\r\n");
out.write(" <td width=10% align=center>");
out.print(rs.getObject(6));
out.write("</td>\r\n");
out.write(" <td width=15% align=center>");
out.print(rs.getObject(7));
out.write("</td>\r\n");
out.write(" ");
ResultSet countrs=conn.executeQuery(sql);
String temp1="豪华";
if(temp==str){
while(countrs.next())
{
out.write("\r\n");
out.write(" \r\n");
out.write(" <td width=15% align=center>");
out.print(countrs.getInt("rentable"));
out.write("</td>\r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" \r\n");
out.write(" \r\n");
out.write(" ");
} conn.close();
out.write("\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write("\r\n");
out.write(" </textarea> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"55\" colspan=\"3\"><form name=\"form1\" method=\"post\" action=\"\">\r\n");
out.write(" <input name=\"submit1\" type=\"button\" onClick=\"JavaScript:location.href='roominfo.jsp';\" value=\"具体房间查询\">\r\n");
out.write(" \r\n");
out.write(" \r\n");
out.write(" \r\n");
out.write(" </form></td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -