⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 roominfo_jsp.java

📁 酒店前台管理
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;

public final class roominfo_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.Vector _jspx_dependants;

  public java.util.List 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=GB18030");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, 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("     \n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=GB18030\">\n");
      out.write("<title>Insert title here</title>\n");
      out.write("</head>\n");
      out.write("<body>\n");
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); 
      String url="jdbc:sqlserver://localhost:1433;DatabaseName=HF"; 
//pubs为你的数据库的 
String user="sa"; 
String password="123"; 
int id,count=0;
String path="";
Connection conn= DriverManager.getConnection(url,user,password); 
Statement stmt=conn.createStatement(); 
String sql="select * from roomclass"; 
ResultSet rs=stmt.executeQuery(sql); 
while(rs.next()) {
      out.write("\r\n");
      out.write("\r\n");
      out.write("<td></td>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<BR>\r\n");
      out.write("<TABLE style=\"MARGIN-BOTTOM: 6px\" cellSpacing=1 cellPadding=0 width=\"100%\" \r\n");
      out.write("      align=center border=0>\r\n");
      out.write("        <TR bgColor=#ffffff>\r\n");
      out.write("          <TD align=middle colSpan=2 height=100>\r\n");
      out.write("            <DIV align=center></DIV>\r\n");
      out.write("            <TABLE height=5 cellSpacing=0 cellPadding=0 width=\"95%\" align=center \r\n");
      out.write("            border=0>\r\n");
      out.write("              <TBODY>\r\n");
      out.write("              <TR>\r\n");
      out.write("                <TD vAlign=top width=\"100%\">\r\n");
      out.write("                  <TABLE cellSpacing=0 width=\"100%\" border=0>\r\n");
      out.write("                    <TBODY>\r\n");
      out.write("                    <TR>\r\n");
      out.write("                      <TD vAlign=top width=\"100%\" bgColor=#ffffff>\r\n");
      out.write("                        <TABLE cellSpacing=0 cellPadding=0 width=\"100%\" \r\n");
      out.write("border=0>\r\n");
      out.write("                          <TBODY>\r\n");
      out.write("                          <TR>\r\n");
      out.write("                            <TD style=\"BORDER-RIGHT: #dbc2b0 1px solid\" \r\n");
      out.write("                            width=180>\r\n");
      out.write("                              <DIV align=center><IMG \r\n");
      out.write("                              src=\"");
      out.print(rs.getString(5));
      out.write("\" \r\n");
      out.write("                              border=0><BR><BR>参考图片</DIV></TD>\r\n");
      out.write("                            <TD align=middle width=362>\r\n");
      out.write("                              <DIV align=center>\r\n");
      out.write("                              <CENTER>\r\n");
      out.write("                              <TABLE style=\"BORDER-COLLAPSE: collapse\" \r\n");
      out.write("                              borderColor=#808080 cellSpacing=0 cellPadding=0 \r\n");
      out.write("                              width=\"90%\" bgColor=#f5efe7 border=1>\r\n");
      out.write("                                <TBODY>\r\n");
      out.write("                                <TR align=middle>\r\n");
      out.write("                                <TD colSpan=2 height=25 bgcolor=#99ccff>房间类型:");
      out.print(rs.getString(2));
      out.write("<A \r\n");
      out.write("                                href=\"detail.do?productId=\"></A></TD></TR>\r\n");
      out.write("                                <TR >\r\n");
      out.write("                                <TD width=\"50%\" height=25 bgcolor=#99ccff>\r\n");
      out.write("                                <DIV align=right>价格:</DIV></TD>\r\n");
      out.write("                                \r\n");
      out.write("                                <TD width=\"50%\" height=25>\r\n");
      out.write("                                <DIV align=center>");
      out.print(rs.getString(4));
      out.write("¥元</DIV></TD></TR>\r\n");
      out.write("                                <TR >\r\n");
      out.write("                                <TD height=25 bgcolor=\"#99ccff\">\r\n");
      out.write("                                <DIV align=right>床数目</DIV></TD>\r\n");
      out.write("                                \r\n");
      out.write("                                <TD height=25>\r\n");
      out.write("                                <DIV align=center><FONT \r\n");
      out.write("                                color=#d03430>");
      out.print(rs.getInt(3));
      out.write("</DIV></TD></TR>\r\n");
      out.write("                                <TR >\r\n");
      out.write("                                <TD colSpan=2 height=35>\r\n");
      out.write("                                <font bgcolor=#99ccff>");
      out.print(rs.getString(6) );
      out.write("</font></td>\r\n");
      out.write("                               \r\n");
      out.write("                              \r\n");
      out.write("                                \r\n");
      out.write("                              \r\n");
      out.write("                             </TD></TR></TBODY></TABLE></TD></TR>\r\n");
      out.write("                   <hr>\r\n");
      out.write("                    </TBODY></TABLE></TD></TR>\r\n");
      out.write("              <TR>\r\n");
      out.write("                <TD width=\"100%\"></TD></TR></TBODY></TABLE>\r\n");
      out.write("            <TABLE cellSpacing=0 cellPadding=0 width=\"95%\" border=0>\r\n");
      out.write("              <TBODY>\r\n");
      out.write("              <TR>\r\n");
      out.write("                <TD> </TD></TR></TBODY></TABLE>\r\n");
      out.write("            <BR>\r\n");
      out.write("            <TABLE height=25 cellSpacing=0 cellPadding=0 width=\"100%\" \r\n");
      out.write("              border=0><TBODY>\r\n");
      out.write("              <TR>\r\n");
      out.write("                <TD vAlign=center>\r\n");
      out.write("                  <DIV align=center><IMG height=1 \r\n");
      out.write("                  src=\"images/seperator.gif\" \r\n");
      out.write("              width=359></DIV></TD></TR></TBODY></TABLE></TD></TR></TABLE>\r\n");
      out.write("              ");
}
      out.write(" \n");
      out.write("</body>\n");
      out.write("</html>");
    } 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 + -