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

📄 __check.java

📁 一个四层结构的j2ee项目实例。对于初学者相当合适。欢迎下载使用。
💻 JAVA
字号:
/* compiled from JSP: /check.jsp
*
* This code was automatically generated at 18:57:56 on 2002-11-10
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*/

package jsp_servlet;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

// User imports
import javax.naming.*; //[ /check.jsp; Line: 19]import javax.ejb.*; //[ /check.jsp; Line: 19]import java.rmi.RemoteException; //[ /check.jsp; Line: 19]import java.rmi.Remote; //[ /check.jsp; Line: 19]import java.util.*; //[ /check.jsp; Line: 19]

// built-in init parameters:
// boolean             _verbose -- wants debugging

// Well-known variables:
// JspWriter out                  -- to write to the browser
// HttpServletRequest  request    -- the request object.
// HttpServletResponse response   -- the response object.
// PageContext pageContext        -- the page context for this JSP
// HttpSession session            -- the session object for the client (if any)
// ServletContext application     -- The servlet (application) context
// ServletConfig config           -- The ServletConfig for this JSP
// Object page                    -- the instance of this page's implementation class (i.e., 'this')

/**
* This code was automatically generated at 18:57:56 on 2002-11-10
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*
* Copyright (c) 2002 by BEA Systems, Inc. All Rights Reserved.
*/
public final class __check
extends
weblogic.servlet.jsp.JspBase
implements weblogic.servlet.jsp.StaleIndicator
{
    
    String login; //[ /check.jsp; Line: 20]    double amount; //[ /check.jsp; Line: 21]    int namount; //[ /check.jsp; Line: 22]    String samount; //[ /check.jsp; Line: 23]    String Type; //[ /check.jsp; Line: 24]    //[ /check.jsp; Line: 25]    // StaleIndicator interface    public boolean _isStale() {        weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext());        java.io.File f = null;        long lastModWhenBuilt = 0L;        if (sci.isResourceStale("/check.jsp", 1036826918000L, "WebLogic Server 7.0  Thu Jun 20 11:47:11 PDT 2002 190955 ")) return true;        return false;    }        public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) {        java.io.File f = null;        long lastModWhenBuilt = 0L;        if (sci.isResourceStale("/check.jsp", 1036826918000L, "WebLogic Server 7.0  Thu Jun 20 11:47:11 PDT 2002 190955 ")) return true;        return false;    }            
    
    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        
        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=GBK");        out = pageContext.getOut();        JspWriter _originalOut = out;        
        javax.servlet.http.HttpSession session = request.getSession(true);        
        
        
        try { // error page try block                        response.setContentType("text/html; charset=GBK");                        out.print("\r\n<html>\r\n<head>\r\n<title>\r\nchecker\r\n</title>\r\n</head>\r\n\r\n");            sqlaccounts.AdminSession loginBean = null; //[ /check.jsp; Line: 9]            loginBean = (sqlaccounts.AdminSession)pageContext.getAttribute("loginBean"); //[ /check.jsp; Line: 9]            if (loginBean == null) { // begin 'loginBean' instantiation block... //[ /check.jsp; Line: 9]                { // Don't need to synchronize on page scope //[ /check.jsp; Line: 9]                    loginBean = (sqlaccounts.AdminSession)pageContext.getAttribute("loginBean"); //[ /check.jsp; Line: 9]                    if (loginBean == null) { // begin 'loginBean' synchronized instantiation block... //[ /check.jsp; Line: 9]                        loginBean = new sqlaccounts.AdminSession(); //[ /check.jsp; Line: 9]                        pageContext.setAttribute("loginBean", loginBean); //[ /check.jsp; Line: 9]                    } // end synchronized bean instantiation block... //[ /check.jsp; Line: 9]                } // end synchronized bean scope block... //[ /check.jsp; Line: 9]            } // end bean instantiation block... //[ /check.jsp; Line: 9]            out.print("\r\n");            { //[ /check.jsp; Line: 10]                String _propertyValue = request.getParameter("bal"); //[ /check.jsp; Line: 10]                if (_propertyValue != null && !_propertyValue.equals("")) //[ /check.jsp; Line: 10]                loginBean.setBal(Double.valueOf(weblogic.utils.StringUtils.valueOf(_propertyValue)).doubleValue()); //[ /check.jsp; Line: 10]            } //[ /check.jsp; Line: 10]            { //[ /check.jsp; Line: 10]                String _propertyValue = request.getParameter("type"); //[ /check.jsp; Line: 10]                if (_propertyValue != null && !_propertyValue.equals("")) //[ /check.jsp; Line: 10]                loginBean.setType(weblogic.utils.StringUtils.valueOf(_propertyValue)); //[ /check.jsp; Line: 10]            } //[ /check.jsp; Line: 10]            { //[ /check.jsp; Line: 10]                String _propertyValue = request.getParameter("id"); //[ /check.jsp; Line: 10]                if (_propertyValue != null && !_propertyValue.equals("")) //[ /check.jsp; Line: 10]                loginBean.setId(weblogic.utils.StringUtils.valueOf(_propertyValue)); //[ /check.jsp; Line: 10]            } //[ /check.jsp; Line: 10]            out.print("\r\n<body>\r\n<h1>\r\n");            out.print("\r\n");            out.print("\r\n\r\n");            //[ /check.jsp; Line: 27]            login=request.getParameter("Id"); //[ /check.jsp; Line: 28]            samount=request.getParameter("Amount"); //[ /check.jsp; Line: 29]            //namount=Integer.parseInt(samount); //[ /check.jsp; Line: 30]            amount=Double.parseDouble(samount); //[ /check.jsp; Line: 31]            out.println(amount); //[ /check.jsp; Line: 32]            Type=request.getParameter("type"); //[ /check.jsp; Line: 33]            if (loginBean.login(login)) //[ /check.jsp; Line: 34]            out.println("登录成功!\n"); //[ /check.jsp; Line: 35]            else //[ /check.jsp; Line: 36]            out.println("登录失败!\n"); //[ /check.jsp; Line: 37]            if (loginBean.AddAmount(login,Type,amount)) //[ /check.jsp; Line: 38]            out.println("账户创建成功!\n"); //[ /check.jsp; Line: 39]            else //[ /check.jsp; Line: 40]            out.println("账户创建失败!\n"); //[ /check.jsp; Line: 41]            //[ /check.jsp; Line: 42]            if (loginBean.findOrCreateAccount(login,Type,amount)) //[ /check.jsp; Line: 43]            out.println("找到账户!\n"); //[ /check.jsp; Line: 44]            else //[ /check.jsp; Line: 45]            out.println("创建账户成功!\n"); //[ /check.jsp; Line: 46]            out.println("查找类型ID!\n"); //[ /check.jsp; Line: 47]            //[ /check.jsp; Line: 48]            //[ /check.jsp; Line: 49]            if (loginBean.findOrCreateAccount(login,Type,amount)) //[ /check.jsp; Line: 50]            out.println("找到账户!\n"); //[ /check.jsp; Line: 51]            else //[ /check.jsp; Line: 52]            out.println("创建账户成功!\n"); //[ /check.jsp; Line: 53]            Vector  allEmployee=loginBean.findAllByType("zj"); //[ /check.jsp; Line: 54]            int m=allEmployee.size(); //[ /check.jsp; Line: 55]            for(int ww=0 ; ww< m; ww++) //[ /check.jsp; Line: 56]            { //[ /check.jsp; Line: 57]                String []anOrder =( String[])allEmployee.elementAt(ww); //[ /check.jsp; Line: 58]                for(int mm=0;mm<anOrder.length;mm++) //[ /check.jsp; Line: 59]                { //[ /check.jsp; Line: 60]                    out.println("个数 "+ mm +": "+ anOrder[mm]); //[ /check.jsp; Line: 61]                } //[ /check.jsp; Line: 62]            } //[ /check.jsp; Line: 63]            //[ /check.jsp; Line: 64]            //[ /check.jsp; Line: 65]            out.print("\r\n</h1>\r\n</body>\r\n</html>\r\n");        } catch (Throwable __ee) {            while (out != null && out != _originalOut) out = pageContext.popBody();            ((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee);        }                
        //before final close brace...
    }
    
    
}

⌨️ 快捷键说明

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