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

📄 info_0002ejsp_jsp.java

📁 很实用的JSP代码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
import bookshop.run.op_buy;
import bookshop.book.order;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class info_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/info.jsp";from=(10,0);to=(10,70)]
    // end

    static {
    }
    public info_0002ejsp_jsp( ) {
    }

    private static boolean _jspx_inited = false;

    public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
    }

    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;
        String  _value = null;
        try {

            if (_jspx_inited == false) {
                synchronized (this) {
                    if (_jspx_inited == false) {
                        _jspx_init();
                        _jspx_inited = true;
                    }
                }
            }
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html; charset=GB2312");
            pageContext = _jspxFactory.getPageContext(this, request, response,
            			"", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            // HTML // begin [file="/info.jsp";from=(0,88);to=(1,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/info.jsp";from=(1,26);to=(2,0)]
                out.write("\r\n");

            // end
            // begin [file="/info.jsp";from=(2,2);to=(7,0)]
                
                String username = (String)session.getAttribute("username");
                if ( username == null || username.equals("") ){
                	response.sendRedirect("login.jsp?msg=nologin");
                }
            // end
            // HTML // begin [file="/info.jsp";from=(7,2);to=(8,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/info.jsp";from=(8,40);to=(9,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/info.jsp";from=(9,40);to=(10,0)]
                out.write("\r\n");

            // end
            // begin [file="/info.jsp";from=(10,0);to=(10,70)]
                bookshop.run.op_buy my_order = null;
                boolean _jspx_specialmy_order  = false;
                 synchronized (pageContext) {
                    my_order= (bookshop.run.op_buy)
                    pageContext.getAttribute("my_order",PageContext.PAGE_SCOPE);
                    if ( my_order == null ) {
                        _jspx_specialmy_order = true;
                        try {
                            my_order = (bookshop.run.op_buy) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "bookshop.run.op_buy");
                        } catch (ClassNotFoundException exc) {
                             throw new InstantiationException(exc.getMessage());
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of class "+"bookshop.run.op_buy", exc);
                        }
                        pageContext.setAttribute("my_order", my_order, PageContext.PAGE_SCOPE);
                    }
                 } 
                if(_jspx_specialmy_order == true) {
            // end
            // begin [file="/info.jsp";from=(10,0);to=(10,70)]
                }
            // end
            // HTML // begin [file="/info.jsp";from=(10,70);to=(12,0)]
                out.write("\r\n\r\n");

            // end
            // begin [file="/info.jsp";from=(12,2);to=(24,0)]
                
                String mesg = "";
                String Uid = (String) session.getAttribute("userid");
                long uid = 0;
                try {
                	uid = Long.parseLong(Uid);
                } catch (Exception e) {
                	uid =0;
                	mesg = "出现不可预知错误!";
                }
                if (!my_order.getOrder(uid))
                	mesg = "你在本站还没有购买过图书。"	;
            // end
            // HTML // begin [file="/info.jsp";from=(24,2);to=(32,0)]
                out.write("\r\n\r\n\r\n<script language=\"javascript\">\r\nfunction openScript(url,name, width, height){\r\n\tvar Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );\r\n}\r\n</script>\r\n");

⌨️ 快捷键说明

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