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

📄 _numguess__jsp.java

📁 《jsp编程起步》里面的所有源代码
💻 JAVA
字号:
/*
 * JSP generated by Resin 1.2.0 -- Wed Nov  1 07:35:54 PST 2000
 */

package _jsp;
import java.io.*;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import javax.servlet.http.*;
import num.NumberGuessBean;

public class _numguess__jsp extends com.caucho.jsp.JavaPage{
  
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    com.caucho.jsp.QPageContext pageContext = (com.caucho.jsp.QPageContext) com.caucho.jsp.QJspFactory.create().getPageContext(this, request, response, null, true, 8192, true);
    javax.servlet.jsp.JspWriter out = (javax.servlet.jsp.JspWriter) pageContext.getOut();
    com.caucho.jsp.ByteWriteStream _jsp_raw_out;
    _jsp_raw_out = (com.caucho.jsp.ByteWriteStream) out;
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    javax.servlet.http.HttpSession session = pageContext.getSession();
    javax.servlet.ServletContext application = pageContext.getServletContext();
    response.setContentType("text/html; charset=GB2312");
    try {
      _jsp_raw_out.write(_jsp_string0, 0, _jsp_string0.length);
      _jsp_raw_out.write(_jsp_string0, 0, _jsp_string0.length);
      num.NumberGuessBean numguess;
      synchronized (session) {
        numguess = (num.NumberGuessBean) session.getValue("numguess");
        if (numguess == null) {
          numguess = new num.NumberGuessBean();
          session.putValue("numguess", numguess);
        }
      }
      _jsp_raw_out.write(_jsp_string0, 0, _jsp_string0.length);
      {
        java.lang.String _jspParam;
        java.lang.String []_jspParams;
      _jspParam = request.getParameter("guess");
      if (_jspParam != null && ! _jspParam.equals(""))
        numguess.setGuess(_jspParam);}
      _jsp_raw_out.write(_jsp_string1, 0, _jsp_string1.length);
       if (numguess.getSuccess()) { 
      _jsp_raw_out.write(_jsp_string2, 0, _jsp_string2.length);
      out.print(( numguess.getNumGuesses() ));
      _jsp_raw_out.write(_jsp_string3, 0, _jsp_string3.length);
       numguess.reset(); 
      _jsp_raw_out.write(_jsp_string4, 0, _jsp_string4.length);
       } else if (numguess.getNumGuesses() == 0) { 
      _jsp_raw_out.write(_jsp_string5, 0, _jsp_string5.length);
       } else { 
      _jsp_raw_out.write(_jsp_string6, 0, _jsp_string6.length);
      out.print(( numguess.getHint() ));
      _jsp_raw_out.write(_jsp_string7, 0, _jsp_string7.length);
      out.print(( numguess.getNumGuesses() ));
      _jsp_raw_out.write(_jsp_string8, 0, _jsp_string8.length);
       } 
      _jsp_raw_out.write(_jsp_string9, 0, _jsp_string9.length);
    } catch (java.lang.Throwable e) {
      pageContext.handlePageException(e);
    } finally {
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
    }
  }

  private java.util.ArrayList _caucho_depends;
  private java.util.ArrayList _caucho_cache;
  private com.caucho.java.LineMap _caucho_line_map;

  public boolean _caucho_isModified()
  {
    if (com.caucho.util.CauchoSystem.getVersionId() != -1355223634)
      return true;
    for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
      com.caucho.jsp.Depend depend;
      depend = (com.caucho.jsp.Depend) _caucho_depends.get(i);
      if (depend.isModified())
        return true;
    }
    return false;
  }

  public long _caucho_lastModified()
  {
    return 0;
  }

  public com.caucho.java.LineMap _caucho_getLineMap()
  {
    return _caucho_line_map;
  }

  public void init(com.caucho.java.LineMap lineMap,
                   com.caucho.vfs.Path appDir)
    throws javax.servlet.ServletException
  {
    com.caucho.vfs.Path resinHome = com.caucho.util.CauchoSystem.getResinHome();
    com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
    mergePath.addMergePath(appDir);
    mergePath.addMergePath(resinHome);
    mergePath.addClassPath(getClass().getClassLoader());
    _caucho_line_map = new com.caucho.java.LineMap("_numguess__jsp.java", "/numguess.jsp");
    _caucho_line_map.add(1, 1);
    _caucho_line_map.add(1, 30);
    _caucho_line_map.add(4, 41);
    _caucho_line_map.add(14, 50);
    _caucho_line_map.add(20, 54);
    _caucho_line_map.add(31, 56);
    _caucho_line_map.add(43, 62);
    _caucho_depends = new java.util.ArrayList();
    _caucho_depends.add(new com.caucho.jsp.Depend(appDir.lookup("numguess.jsp"), 987681974000L, 1049L));
  }

  private static byte []_jsp_string6;
  private static byte []_jsp_string3;
  private static byte []_jsp_string5;
  private static byte []_jsp_string1;
  private static byte []_jsp_string8;
  private static byte []_jsp_string7;
  private static byte []_jsp_string4;
  private static byte []_jsp_string2;
  private static byte []_jsp_string9;
  private static byte []_jsp_string0;
  static {
    try {
      _jsp_string6 = "\r\n\r\n	  	嗯,<b>".getBytes("GB2312");
      _jsp_string3 = "次<p>\r\n\r\n  		".getBytes("GB2312");
      _jsp_string5 = "\r\n\r\n  		欢迎玩猜数字的游戏!<p>\r\n\r\n		  请输入一个1到100之间的整数!<p>\r\n	\r\n  		<form method=get>\r\n  			你猜呀:<input type=text name=guess>\r\n  			<input type=submit value=\"提交\">\r\n  		</form>\r\n\r\n	".getBytes("GB2312");
      _jsp_string1 = "\r\n\r\n<html>\r\n	<head><title>Number Guess</title></head>\r\n	<body bgcolor=\"white\">\r\n	<font size=4>\r\n\r\n	".getBytes("GB2312");
      _jsp_string8 = "次喽!<p>\r\n	\r\n  		\r\n  		<form method=get>\r\n  			你猜呀:<input type=text name=guess>\r\n  			<input type=submit value=\"提交\">\r\n  		</form>\r\n\r\n	".getBytes("GB2312");
      _jsp_string7 = "</b><br>\r\n\r\n		  你已经猜了".getBytes("GB2312");
      _jsp_string4 = "\r\n\r\n	  	<a href=\"numguess.jsp\">再来一次</a>\r\n\r\n	".getBytes("GB2312");
      _jsp_string2 = "\r\n\r\n  		恭喜你!你猜中了!\r\n  		你所用的次数:".getBytes("GB2312");
      _jsp_string9 = "\r\n\r\n	</font>\r\n	</body>\r\n</html>\r\n".getBytes("GB2312");
      _jsp_string0 = "\r\n".getBytes("GB2312");
    } catch (java.io.UnsupportedEncodingException e) {
      e.printStackTrace();
    }
  }
}

⌨️ 快捷键说明

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