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

📄 research_jsp.java

📁 网吧网站留言本。主要使用基于MVC模式的JSP+JAVABEAN+SERVLET
💻 JAVA
字号:
package org.apache.jsp;

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

public final class reSearch_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=GBK");
      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("\r\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "top.htm", out, true);
      out.write('\r');
      out.write('\n');

String title="";
if(session.getAttribute("keyword")!=null|| session.getAttribute("className")!=null){
  String className=(String)session.getAttribute("className");
  if(className.equals("gbContent")){
    title="留言内容";
  }else if(className.equals("gbReply")){
    title="回复内容";
  }else if(className.equals("gbTitle")){
    title="留言主题";
  }else if(className.equals("gbPerson")){
    title="留言作者";
  }

}
pageContext.setAttribute("Title",title);




      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<title>搜索 - 中青网络会所留言本系统JSPv1.0 </title>\r\n");
      out.write("<meta name=\"Robots\" content=\"all\">\r\n");
      out.write("<meta name=\"Generator\" content=\"Dreamweaver,ASP\">\r\n");
      out.write("<meta name=\"copyright\" content=\"Copyright 中青网络会所 2007-2008\">\r\n");
      out.write("<meta name=\"Author\" content=\"zqnet\">\r\n");
      out.write("<meta name=\"description\" content=\"中青网络会所留言本,有事请留言。\">\r\n");
      out.write("<meta name=\"keywords\" content=\"中青网络会所,留言本,留言,中青网络会所留言本,蓝色经典\">\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      out.write("<link href=\"css.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      out.write("<table width=\"680\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#DCE7F4\" class=\"biao_bdr\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td>\r\n");
      out.write("      <div align=\"center\">\r\n");
      out.write("      在留言记录的<font color=\"red\"> ");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${pageScope.Title}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("</font>中未找到关键字为<font color=\"red\">");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope.keyword}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("</font>相关数据。\r\n");
      out.write("      </div>\r\n");
      out.write("      <div align=\"center\"><span class=\"style1\"><span class=\"style2\"><br>\r\n");
      out.write("            <span style=\"font-size: 16pt; font-weight: bold;\">请重新搜索</span></span></span><br>\r\n");
      out.write("      <br>\r\n");
      out.write("        <table width=\"360\" border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#99CCFF\" class=\"xi\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td><form name=\"form1\" method=\"post\" action=\"searchok.jsp\">\r\n");
      out.write("                <br>\r\n");
      out.write("                <p align=\"center\" class=\"style1\"> <span class=\"style3\" style=\"font-weight: bold\">关键字:</span>\r\n");
      out.write("                    <input name=\"keyword\" type=\"text\" id=\"keyword\" maxlength=\"12\">\r\n");
      out.write("                    <select name=\"classname\" id=\"classname\">\r\n");
      out.write("                      <option value=\"gbTitle\" selected>按留言主题</option>\r\n");
      out.write("                      <option value=\"gbContent\">按留言内容</option>\r\n");
      out.write("                      <option value=\"gbReply\">按回复内容</option>\r\n");
      out.write("                      <option value=\"gbPerson\">按留言作者</option>\r\n");
      out.write("                    </select>\r\n");
      out.write("                    <input name=\"imageField\" type=\"image\" src=\"images/tijiao.gif\" alt=\"查询\" align=\"middle\" width=\"27\" height=\"22\" border=\"0\">\r\n");
      out.write("                </p>\r\n");
      out.write("            </form></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("        <br>\r\n");
      out.write("    </div></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");

if(session.getAttribute("keyword")!=null|| session.getAttribute("className")!=null){
  //session.removeAttribute("keyword");
 // session.removeAttribute("className");
  session.setAttribute("keyword",null);
  session.setAttribute("className",null);
  session.setAttribute("totalRecords",null);
  session.setAttribute("vcs",null);

}



      out.write("\r\n");
      out.write("\r\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "buttom.jsp", out, true);
      out.write("\r\n");
      out.write("</body></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 + -