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

📄 __search.java

📁 一个论坛的实例
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
  public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException 
  {  
    
    // declare and set well-known variables:
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.ServletContext application = config.getServletContext();
    javax.servlet.jsp.tagext.Tag _activeTag = null;
    // variables for Tag extension protocol    int _int0 = 0;    org.apache.struts.taglib.bean.MessageTag _bean_message0 = null;    
    Object page = this;
    javax.servlet.jsp.JspWriter out;
    javax.servlet.jsp.PageContext pageContext =    javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);    
    response.setHeader("Content-Type", "text/html; charset=UTF-8");    out = pageContext.getOut();    JspWriter _originalOut = out;    
    javax.servlet.http.HttpSession session = request.getSession(true);    
    
    
    try { // error page try block            response.setContentType("text/html; charset=UTF-8");            _writeText(response, out, _wl_block0, _wl_block0Bytes);      _writeText(response, out, _wl_block1, _wl_block1Bytes);      java.lang.Integer istartindex = null; //[ /search.jsp; Line: 6]      istartindex = (java.lang.Integer)request.getAttribute("istartindex"); //[ /search.jsp; Line: 6]      if (istartindex == null) { // begin 'istartindex' instantiation block... //[ /search.jsp; Line: 6]        { // Don't need to synchronize on request scope //[ /search.jsp; Line: 6]          istartindex = (java.lang.Integer)request.getAttribute("istartindex"); //[ /search.jsp; Line: 6]          if (istartindex == null) { // begin 'istartindex' synchronized instantiation block... //[ /search.jsp; Line: 6]            if (true) throw new ServletException("Could instantiate bean 'istartindex', it is abstract, has no public default constructor, or is not a public class"); //[ /search.jsp; Line: 6]            request.setAttribute("istartindex", istartindex); //[ /search.jsp; Line: 6]          } // end synchronized bean instantiation block... //[ /search.jsp; Line: 6]        } // end synchronized bean scope block... //[ /search.jsp; Line: 6]      } // end bean instantiation block... //[ /search.jsp; Line: 6]      _writeText(response, out, _wl_block2, _wl_block2Bytes);      java.lang.Integer ithispage = null; //[ /search.jsp; Line: 7]      ithispage = (java.lang.Integer)request.getAttribute("ithispage"); //[ /search.jsp; Line: 7]      if (ithispage == null) { // begin 'ithispage' instantiation block... //[ /search.jsp; Line: 7]        { // Don't need to synchronize on request scope //[ /search.jsp; Line: 7]          ithispage = (java.lang.Integer)request.getAttribute("ithispage"); //[ /search.jsp; Line: 7]          if (ithispage == null) { // begin 'ithispage' synchronized instantiation block... //[ /search.jsp; Line: 7]            if (true) throw new ServletException("Could instantiate bean 'ithispage', it is abstract, has no public default constructor, or is not a public class"); //[ /search.jsp; Line: 7]            request.setAttribute("ithispage", ithispage); //[ /search.jsp; Line: 7]          } // end synchronized bean instantiation block... //[ /search.jsp; Line: 7]        } // end synchronized bean scope block... //[ /search.jsp; Line: 7]      } // end bean instantiation block... //[ /search.jsp; Line: 7]      _writeText(response, out, _wl_block3, _wl_block3Bytes);      java.lang.String queryString = null; //[ /search.jsp; Line: 8]      queryString = (java.lang.String)request.getAttribute("queryString"); //[ /search.jsp; Line: 8]      if (queryString == null) { // begin 'queryString' instantiation block... //[ /search.jsp; Line: 8]        { // Don't need to synchronize on request scope //[ /search.jsp; Line: 8]          queryString = (java.lang.String)request.getAttribute("queryString"); //[ /search.jsp; Line: 8]          if (queryString == null) { // begin 'queryString' synchronized instantiation block... //[ /search.jsp; Line: 8]            queryString = new java.lang.String(); //[ /search.jsp; Line: 8]            request.setAttribute("queryString", queryString); //[ /search.jsp; Line: 8]          } // end synchronized bean instantiation block... //[ /search.jsp; Line: 8]        } // end synchronized bean scope block... //[ /search.jsp; Line: 8]      } // end bean instantiation block... //[ /search.jsp; Line: 8]      _writeText(response, out, _wl_block4, _wl_block4Bytes);      org.apache.lucene.search.Hits hits = null; //[ /search.jsp; Line: 9]      hits = (org.apache.lucene.search.Hits)request.getAttribute("hits"); //[ /search.jsp; Line: 9]      if (hits == null) { // begin 'hits' instantiation block... //[ /search.jsp; Line: 9]        { // Don't need to synchronize on request scope //[ /search.jsp; Line: 9]          hits = (org.apache.lucene.search.Hits)request.getAttribute("hits"); //[ /search.jsp; Line: 9]          if (hits == null) { // begin 'hits' synchronized instantiation block... //[ /search.jsp; Line: 9]            if (true) throw new ServletException("Could instantiate bean 'hits', it is abstract, has no public default constructor, or is not a public class"); //[ /search.jsp; Line: 9]            request.setAttribute("hits", hits); //[ /search.jsp; Line: 9]            _writeText(response, out, _wl_block5, _wl_block5Bytes);          } // end synchronized bean instantiation block... //[ /search.jsp; Line: 10]        } // end synchronized bean scope block... //[ /search.jsp; Line: 10]      } // end bean instantiation block... //[ /search.jsp; Line: 10]      _writeText(response, out, _wl_block6, _wl_block6Bytes);      _writeText(response, out, _wl_block7, _wl_block7Bytes);      _writeText(response, out, _wl_block8, _wl_block8Bytes);      //[ /search.jsp; Line: 13]      int startindex = istartindex.intValue(); //[ /search.jsp; Line: 14]      int thispage = ithispage.intValue(); //[ /search.jsp; Line: 15]      int maxpage = 50; //[ /search.jsp; Line: 16]      _writeText(response, out, _wl_block9, _wl_block9Bytes);      //^%$__TAG_CODEGEN : begin message custom tag block... //[ /search.jsp; Line: 20]      /*** declare AT_BEGIN TagExtra Vars here ***/ //[ /search.jsp; Line: 20]      if (_bean_message0 == null) _bean_message0 = new org.apache.struts.taglib.bean.MessageTag(); //[ /search.jsp; Line: 20]      _bean_message0.setPageContext(pageContext); //[ /search.jsp; Line: 20]      _bean_message0.setParent((javax.servlet.jsp.tagext.Tag)null); //[ /search.jsp; Line: 20]      _activeTag = _bean_message0; //[ /search.jsp; Line: 20]      _bean_message0.setKey(weblogic.utils.StringUtils.valueOf("search.title")); //[ /search.jsp; Line: 20]      _int0 = _bean_message0.doStartTag(); //[ /search.jsp; Line: 20]      if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[ /search.jsp; Line: 20]        throw new JspTagException("Since tag class org.apache.struts.taglib.bean.MessageTag does not implement BodyTag, it cannot return BodyTag.EVAL_BODY_BUFFERED"); //[ /search.jsp; Line: 20]      } //[ /search.jsp; Line: 20]      /*** sync AT_BEGIN TagExtra Vars here ***/ //[ /search.jsp; Line: 20]      _int0 = _bean_message0.doEndTag(); //[ /search.jsp; Line: 20]      if (_int0 == Tag.SKIP_PAGE) { _activeTag = null; _releaseTags(_bean_message0); return; } //[ /search.jsp; Line: 20]      _activeTag = _bean_message0.getParent(); _bean_message0.release(); //[ /search.jsp; Line: 20]      /*** sync AT_BEGIN TagExtra Vars here ***/ //[ /search.jsp; Line: 20]      /*** declare & sync AT_END TagExtra Vars here ***/ //[ /search.jsp; Line: 20]      _writeText(response, out, _wl_block10, _wl_block10Bytes);      //[ /search.jsp; Line: 24]      if ((startindex + maxpage) > hits.length()) { //[ /search.jsp; Line: 25]        thispage = hits.length() - startindex; //[ /search.jsp; Line: 26]      } //[ /search.jsp; Line: 27]      for (int i = startindex; i < (thispage + startindex); i++) { //[ /search.jsp; Line: 28]        Document doc = hits.doc(i); //[ /search.jsp; Line: 29]        String doctitle = doc.get("title"); //[ /search.jsp; Line: 30]        String url = doc.get("url"); //[ /search.jsp; Line: 31]        String summary = doc.get("summary"); //[ /search.jsp; Line: 32]        if ((doctitle == null) || doctitle.equals("")) { //[ /search.jsp; Line: 33]          doctitle = url; //[ /search.jsp; Line: 34]        } //[ /search.jsp; Line: 35]        _writeText(response, out, _wl_block11, _wl_block11Bytes);        out.print(String.valueOf(SysUtil.getSearchURL(url)));  //[ /search.jsp; Line: 39]        _writeText(response, out, _wl_block12, _wl_block12Bytes);        out.print(String.valueOf(doctitle));  //[ /search.jsp; Line: 39]        _writeText(response, out, _wl_block13, _wl_block13Bytes);        out.print(String.valueOf(summary));  //[ /search.jsp; Line: 42]        _writeText(response, out, _wl_block14, _wl_block14Bytes);        //[ /search.jsp; Line: 48]      } //[ /search.jsp; Line: 49]      if ( (startindex + maxpage) < hits.length()) { //[ /search.jsp; Line: 50]        String moreurl="search.bbscs?query=" + URLEncoder.encode(queryString,"UTF-8") + "&maxresults=" + maxpage + //[ /search.jsp; Line: 51]        "&startat=" + (startindex + maxpage); //[ /search.jsp; Line: 52]        out.println("<a href="+moreurl+">More Results>></a>"); //[ /search.jsp; Line: 53]      } //[ /search.jsp; Line: 54]      _writeText(response, out, _wl_block15, _wl_block15Bytes);    } catch (Throwable __ee) {      while (out != null && out != _originalOut) out = pageContext.popBody();      _releaseTags(_activeTag);      ((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee);    }        
    //before final close brace...
  }
  
  
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -