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

📄 atm_jsp.java

📁 Sun公司的<J2EE Tutorial>范例代码
💻 JAVA
字号:
package org.apache.jsp;

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

public final class atm_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");
      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('\n');
      com.sun.ebank.web.CustomerBean customerBean = null;
      synchronized (request) {
        customerBean = (com.sun.ebank.web.CustomerBean) _jspx_page_context.getAttribute("customerBean", PageContext.REQUEST_SCOPE);
        if (customerBean == null){
          customerBean = new com.sun.ebank.web.CustomerBean();
          _jspx_page_context.setAttribute("customerBean", customerBean, PageContext.REQUEST_SCOPE);
        }
      }
      out.write('\n');
      org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(_jspx_page_context.findAttribute("customerBean"), "customer", "${pageContext.request.userPrincipal.name}", null, null, false);
      out.write("\n<c:set var=\"accounts\" value=\"");
      out.write("${customerBean.accounts}");
      out.write("\" />\n<center>\n<table border=0 cellpadding=2 cellspacing=0 width=500 summary=\"layout\"> \n  <c:url var=\"url\" value=\"/atmAck\" />\n  <form name=\"atm\" method=\"post\" action=\"");
      out.write("${url}");
      out.write("\" >\t\t  \n  <tr>\n  <td>\n  <select name=operation> \n    <option value=0<c:if test=\"");
      out.write("${param.operation == 0}");
      out.write("\"> selected</c:if>><fmt:message key=\"Withdraw\" /></option>  \t   \n    <option value=1<c:if test=\"");
      out.write("${param.operation == 1}");
      out.write("\"> selected</c:if>><fmt:message key=\"Deposit\" /></option>   \n  </select>\n  </td>\n\n  <td>\n  <select name=accountId>\n    <c:forEach items=\"");
      out.write("${accounts}");
      out.write("\" var=\"ad\">\n      <c:if test=\"");
      out.write("${param.accountId == ad.accountId}");
      out.write("\">\n        <c:if test=\"");
      out.write("${ad.type != 'Credit'}");
      out.write("\">\n          <option value=\"");
      out.write("${ad.accountId}");
      out.write("\" selected>");
      out.write("${ad.description}");
      out.write(" (<fmt:formatNumber value=\"");
      out.write("${ad.balance}");
      out.write("\" type=\"currency\" />)</option>\n        </c:if>\n        <c:if test=\"");
      out.write("${ad.type == 'Credit'}");
      out.write("\">\n          <option value=\"");
      out.write("${ad.accountId}");
      out.write("\" selected>");
      out.write("${ad.description}");
      out.write(" (<fmt:formatNumber value=\"");
      out.write("${ad.remainingCredit}");
      out.write("\" type=\"currency\" />)</option>\n        </c:if>\n      </c:if>\n      <c:if test=\"");
      out.write("${param.accountId != ad.accountId}");
      out.write("\">\n        <c:if test=\"");
      out.write("${ad.type != 'Credit'}");
      out.write("\">\n          <option value=\"");
      out.write("${ad.accountId}");
      out.write('"');
      out.write('>');
      out.write("${ad.description}");
      out.write(" (<fmt:formatNumber value=\"");
      out.write("${ad.balance}");
      out.write("\" type=\"currency\" />)</option>\n        </c:if>\n        <c:if test=\"");
      out.write("${ad.type == 'Credit'}");
      out.write("\">\n          <option value=\"");
      out.write("${ad.accountId}");
      out.write('"');
      out.write('>');
      out.write("${ad.description}");
      out.write(" (<fmt:formatNumber value=\"");
      out.write("${ad.remainingCredit}");
      out.write("\" type=\"currency\" />)</option>\n        </c:if>\n      </c:if>\n    </c:forEach>\n  </select>\n  </td>\n  <td>&nbsp;</td>\n  <td>&nbsp;</td>\n  </tr>\n\n  <tr>\n  <td><b><fmt:message key=\"ATMAmount\"/></b></td>\n  <td><input type=\"text\" size=\"15\" name=\"amount\"></td>\n  <td><input type=\"submit\" value=\"<fmt:message key='Submit'/>\"></td>\n  <td><input type=\"reset\" value=\"<fmt:message key='Clear'/>\"></td>\n  </tr>\n    \n  </form>\n</table>\n</center>\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 + -