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

📄 _add__new.java

📁 用jsp和servlet开发的简单通讯录
💻 JAVA
字号:

import oracle.jsp.runtime.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import oracle.jsp.el.*;
import javax.servlet.jsp.el.*;


public class _add__new extends com.orionserver.http.OrionHttpJspPage {


  // ** Begin Declarations


  // ** End Declarations

  public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {

    response.setContentType( "text/html;charset=GBK");
    /* set up the intrinsic variables using the pageContext goober:
    ** session = HttpSession
    ** application = ServletContext
    ** out = JspWriter
    ** page = this
    ** config = ServletConfig
    ** all session/app beans declared in globals.jsa
    */
    PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
    // Note: this is not emitted if the session directive == false
    HttpSession session = pageContext.getSession();
    int __jsp_tag_starteval;
    ServletContext application = pageContext.getServletContext();
    JspWriter out = pageContext.getOut();
    _add__new page = this;
    ServletConfig config = pageContext.getServletConfig();
    javax.servlet.jsp.el.VariableResolver __ojsp_varRes = (VariableResolver)new OracleVariableResolverImpl(pageContext);

    try {


      out.write(__oracle_jsp_text[0]);
      out.write(__oracle_jsp_text[1]);
                HttpSession sess=request.getSession();          if (sess.getAttribute("token")==null) {                            //out.print("<font color=red size=6>Sorry! You can not access the information!</font>");         
      if (true) {
        String __url=OracleJspRuntime.toStr("back");
        // Forward 
        pageContext.forward( __url);
        return;
      }

      } 
      out.write(__oracle_jsp_text[2]);
                    /*<a href='add_new.jsp?add=1'>添加新类型:</a>              String add = request.getParameter("add");              if(add==null)              ;              else{                out.print("<form name='form13' method='post' action='add_new.jsp'>");                out.print("<input type='text' name='add_type' maxlength='10' size='10'/>");                out.print("<input type='submit' name='submit' value='添加'/>");                out.print("</form>");              }*/              
      out.write(__oracle_jsp_text[3]);

    }
    catch (Throwable e) {
      if (!(e instanceof javax.servlet.jsp.SkipPageException)){
        try {
          if (out != null) out.clear();
        }
        catch (Exception clearException) {
        }
        pageContext.handlePageException(e);
      }
    }
    finally {
      OracleJspRuntime.extraHandlePCFinally(pageContext, true);
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
    }

  }
  private static final char __oracle_jsp_text[][]=new char[4][];
  static {
    try {
    __oracle_jsp_text[0] = 
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n".toCharArray();
    __oracle_jsp_text[1] = 
    "\n<html>\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=GBK\"/>\n    <title>add_new</title>\n  </head>\n  <body>\n    ".toCharArray();
    __oracle_jsp_text[2] = 
    "\n   <form name=\"form1\" action=\"add_friend\" method=\"post\"\n              enctype=\"application/x-www-form-urlencoded\">\n      <p>\n        姓名: \n        <input type=\"text\" name=\"frd_name\" maxlength=\"20\" size=\"20\"/>\n      </p>\n      <p>\n        性别:\n        <select size=\"1\" name=\"frd_sex\">\n            <option value='男'>男</option>\n            <option value='女'>女</option></select>\n      </p>\n      <p>\n        类型: \n        <select size=\"1\" name=\"frd_type_id\">\n          <option value=\"1\">\n            亲人\n          </option>\n          <option value=\"2\">\n            朋友\n          </option>\n          <option value=\"3\">\n            老师\n          </option>\n        </select> \n        ".toCharArray();
    __oracle_jsp_text[3] = 
    "\n      </p>\n      <p>\n        电话: \n        <input type=\"text\" name=\"frd_tele\" maxlength=\"25\" size=\"25\"\n               onblur=\"chk_tele_fmt()\"/>\n      </p>\n      <p>\n        电邮:<input type=\"text\" name=\"frd_email\" maxlength=\"30\" size=\"30\"\n                  onblur=\"chk_email_fmt()\"/>\n      </p>\n      <p>\n        生日:<input type=\"text\" name=\"frd_birth\" maxlength=\"20\" size=\"15\"/>\n      </p>\n      <p>\n        备注:<textarea name=\"frd_describe\" rows=\"3\"></textarea>\n      </p>\n      <p>\n        &nbsp;\n      </p>\n      <p>\n        <input type=\"submit\" name=\"submit\" value=\"新增\"/><input type=\"reset\"\n                                                              name=\"reset\"\n                                                              value=\"重新填写\"/>\n      </p>\n    </form>\n  </body>\n</html>".toCharArray();
    }
    catch (Throwable th) {
      System.err.println(th);
    }
}
}

⌨️ 快捷键说明

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