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

📄 __userchakanshouji.java

📁 一个使用EJB开发的真实项目
💻 JAVA
字号:
/* compiled from JSP: /userChaKanShouJi.jsp
*
* This code was automatically generated at 18:40:26 on 2007-1-14
* 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 java.util.*; //[ /userChaKanShouJi.jsp; Line: 1]import java.util.*; //[ /userChaKanShouJi.jsp; Line: 4]import ejb.ShouJiInfoVo; //[ /userChaKanShouJi.jsp; Line: 5]

// 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:40:26 on 2007-1-14
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*
* Copyright (c) 2007 by BEA Systems, Inc. All Rights Reserved.
*/
public final class __userchakanshouji
extends
weblogic.servlet.jsp.JspBase
implements weblogic.servlet.jsp.StaleIndicator
{
  
  String a; //[ /userChaKanShouJi.jsp; Line: 71]  // 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("/userChaKanShouJi.jsp", 1168770676000L, "8.1.4.0", "Asia/Shanghai")) return true;    return false;  }    public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) {    java.io.File f = null;    long lastModWhenBuilt = 0L;    if (sci.isResourceStale("/userChaKanShouJi.jsp", 1168770676000L, "8.1.4.0", "Asia/Shanghai")) return true;    return false;  }      private static void _writeText(ServletResponse rsp, JspWriter out, String block, byte[] blockBytes) throws IOException {    if (!_WL_ENCODED_BYTES_OK || _hasEncodingChanged(rsp)) {      out.print(block);    } else {      ((weblogic.servlet.jsp.ByteWriter)out).write(blockBytes, block);    }   }      private static boolean _hasEncodingChanged(ServletResponse rsp) {    if (_WL_ORIGINAL_ENCODING.equals(rsp.getCharacterEncoding())) {      return false;    }    return true;  }    private static boolean _WL_ENCODED_BYTES_OK = true;    private static final String _WL_ORIGINAL_ENCODING = "GBK";    private static byte[] _getBytes(String block) {    try {      return block.getBytes(_WL_ORIGINAL_ENCODING);    } catch (java.io.UnsupportedEncodingException u) {      _WL_ENCODED_BYTES_OK = false;    }    return null;  }  private final static String _wl_block0 = "\r\n";  private final static byte[] _wl_block0Bytes = _getBytes(_wl_block0);  private final static String _wl_block1 = "\r\n";  private final static byte[] _wl_block1Bytes = _getBytes(_wl_block1);  private final static String _wl_block2 = "\r\n";  private final static byte[] _wl_block2Bytes = _getBytes(_wl_block2);  private final static String _wl_block3 = "\r\n";  private final static byte[] _wl_block3Bytes = _getBytes(_wl_block3);  private final static String _wl_block4 = "\r\n";  private final static byte[] _wl_block4Bytes = _getBytes(_wl_block4);  private final static String _wl_block5 = "\r\n\r\n";  private final static byte[] _wl_block5Bytes = _getBytes(_wl_block5);  private final static String _wl_block6 = "\r\n\r\n<html>\r\n<head>\r\n<title>userChaKan</title>\r\n<script language=\"javascript\" type=\"text/javascript\">\r\nfunction test(){\r\na=document.form1.select.selectedIndex\r\nif(a==1){if(document.form1.shuru.value.length==0||isNaN(document.form1.shuru.value)){alert(\"价格不能为空,并只能为数字哦\");document.form1.shuru.focus();return false;}}\r\nif(a==2){if(document.form1.shuru.value.length==0){alert(\"查找条件不能为空\");document.form1.shuru.focus();return false;}}\r\nif(a==3){if(document.form1.shuru.value.length==0){alert(\"查找条件不能为空\");document.form1.shuru.focus();return false;}}\r\n}\r\n</script>\r\n</head>\r\n<body bgcolor=\"#ffffff\" background=\"photo/userRight.jpg\">\r\n<form name=\"form1\" method=\"post\" action=\"userChaKanShouJIxuanze.jsp\" onsubmit=\"return test()\">\r\n<table width=\"660\" height=\"29\" border=\"0\">\r\n  <tr>\r\n    <td width=\"120\">\r\n      <div align=\"right\">请选择查找方式</div>\r\n    </td>\r\n    <td width=\"243\">\r\n      <div align=\"center\">\r\n        <select name=\"select\">\r\n          <option selected>全部商品</option>\r\n          <option>按价格/元(..以下)</option>\r\n          <option>按品牌(不用输入型号)</option>\r\n          <option>按手机序列号</option>\r\n        </select>\r\n      </div>\r\n    </td>\r\n    <td width=\"131\">\r\n      <div align=\"left\">\r\n        <input type=\"text\" name=\"shuru\" size=\"15\">\r\n      </div>\r\n    </td>\r\n    <td width=\"148\">\r\n      <input type=\"submit\" name=\"Submit\" value=\"查找\">\r\n    </td>\r\n  </tr>\r\n</table>\r\n</form>\r\n<hr>\r\n<br/>\r\n\r\n<table width=\"982\" height=\"38\">\r\n<tr>\r\n  <td width=\"72\"><div align=\"center\">序列号</div></td>\r\n  <td width=\"187\"><div align=\"center\">图片</div></td>\r\n  <td width=\"79\"><div align=\"center\">品牌名</div></td>\r\n  <td width=\"61\"><div align=\"center\">型号</div></td>\r\n  <td width=\"48\"><div align=\"center\">颜色</div></td>\r\n  <td width=\"57\"><div align=\"center\">大小</div></td>\r\n  <td width=\"52\"><div align=\"center\">重量</div></td>\r\n  <td width=\"67\"><div align=\"center\">详细介绍</div></td>\r\n  <td width=\"83\"><div align=\"center\">价格/1</div></td>\r\n  <td width=\"100\"><div align=\"center\">购买数量</div></td>\r\n  <td width=\"128\"><div align=\"left\">购物车</div></td>\r\n</table>\r\n\r\n";  private final static byte[] _wl_block6Bytes = _getBytes(_wl_block6);  private final static String _wl_block7 = "\r\n\r\n";  private final static byte[] _wl_block7Bytes = _getBytes(_wl_block7);  private final static String _wl_block8 = "\r\n<form name=\"form2\" method=\"post\" action=\"gouWuBaoCun1.jsp\">\r\n<table width=\"935\" height=\"29\" border=\"1\">\r\n  <tr>\r\n    <td width=\"56\">\r\n        <div align=\"center\">\r\n          <input type=\"text\" name=\"number\" size=\"8\" readOnly value=\"";  private final static byte[] _wl_block8Bytes = _getBytes(_wl_block8);  private final static String _wl_block9 = "\" />\r\n      </div></td><td width=\"172\"><div align=\"center\">\r\n          <input name=\"imageField\" type=\"image\" src=\"";  private final static byte[] _wl_block9Bytes = _getBytes(_wl_block9);  private final static String _wl_block10 = "\"  border=\"0\">\r\n          </div></td>\r\n      <td width=\"62\">\r\n        <div align=\"center\">\r\n          <input type=\"text\" name=\"name\" size=\"8\" readOnly value=\"";  private final static byte[] _wl_block10Bytes = _getBytes(_wl_block10);  private final static String _wl_block11 = "\"/>\r\n      </div></td>\r\n      <td width=\"70\">\r\n        <div align=\"center\">\r\n          <input type=\"text\" name=\"model\" readOnly  size=\"8\" value=\"";  private final static byte[] _wl_block11Bytes = _getBytes(_wl_block11);  private final static String _wl_block12 = "\" />\r\n      </div></td><td width=\"48\"><div align=\"center\">";  private final static byte[] _wl_block12Bytes = _getBytes(_wl_block12);  private final static String _wl_block13 = "</div></td>\r\n    <td width=\"55\"><div align=\"center\">";  private final static byte[] _wl_block13Bytes = _getBytes(_wl_block13);  private final static String _wl_block14 = "</div></td>\r\n    <td width=\"55\"><div align=\"center\">";  private final static byte[] _wl_block14Bytes = _getBytes(_wl_block14);  private final static String _wl_block15 = "</div></td>\r\n    <td width=\"75\"><div align=\"center\"><a href=\"";  private final static byte[] _wl_block15Bytes = _getBytes(_wl_block15);  private final static String _wl_block16 = "\" target=\"_blank\">查看</a></div></td>\r\n    <td width=\"83\">\r\n        <div align=\"center\">\r\n          <input type=\"text\" name=\"price\"  size=\"8\" readOnly value=\"";  private final static byte[] _wl_block16Bytes = _getBytes(_wl_block16);  private final static String _wl_block17 = "\" />\r\n      </div></td>\r\n    <td width=\"92\">      <div align=\"center\">\r\n      <select name=\"count1\">\r\n          <option selected>1</option>\r\n          <option>2</option>\r\n          <option>3</option>\r\n          <option>4</option>\r\n          <option>5</option>\r\n          <option>6</option>\r\n          <option>7</option>\r\n          <option>8</option>\r\n          <option>9</option>\r\n          <option>10</option>\r\n      </select>\r\n    </div></td>\r\n    <td width=\"97\">\r\n        <div align=\"center\">\r\n          <input type=\"submit\" name=\"tijiao\" value=\"放入购物车\"/>\r\n      </div></td></tr>\r\n</table>\r\n</form>\r\n<p>&nbsp;</p>\r\n";  private final static byte[] _wl_block17Bytes = _getBytes(_wl_block17);  private final static String _wl_block18 = "\r\n</body>\r\n</html>\r\n";  private final static byte[] _wl_block18Bytes = _getBytes(_wl_block18);  
  
  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");            _writeText(response, out, _wl_block0, _wl_block0Bytes);      JavaBean.ShouJiBean shouji = null; //[ /userChaKanShouJi.jsp; Line: 2]      shouji = (JavaBean.ShouJiBean)pageContext.getAttribute("shouji"); //[ /userChaKanShouJi.jsp; Line: 2]      if (shouji == null) { // begin 'shouji' instantiation block... //[ /userChaKanShouJi.jsp; Line: 2]        { // Don't need to synchronize on page scope //[ /userChaKanShouJi.jsp; Line: 2]          shouji = (JavaBean.ShouJiBean)pageContext.getAttribute("shouji"); //[ /userChaKanShouJi.jsp; Line: 2]          if (shouji == null) { // begin 'shouji' synchronized instantiation block... //[ /userChaKanShouJi.jsp; Line: 2]            shouji = new JavaBean.ShouJiBean(); //[ /userChaKanShouJi.jsp; Line: 2]            pageContext.setAttribute("shouji", shouji); //[ /userChaKanShouJi.jsp; Line: 2]            _writeText(response, out, _wl_block1, _wl_block1Bytes);          } // end synchronized bean instantiation block... //[ /userChaKanShouJi.jsp; Line: 3]        } // end synchronized bean scope block... //[ /userChaKanShouJi.jsp; Line: 3]      } // end bean instantiation block... //[ /userChaKanShouJi.jsp; Line: 3]      _writeText(response, out, _wl_block2, _wl_block2Bytes);      _writeText(response, out, _wl_block3, _wl_block3Bytes);      _writeText(response, out, _wl_block4, _wl_block4Bytes);      Iterator it =shouji.selectAll().iterator();  //[ /userChaKanShouJi.jsp; Line: 6]      //[ /userChaKanShouJi.jsp; Line: 6]      _writeText(response, out, _wl_block5, _wl_block5Bytes);      //[ /userChaKanShouJi.jsp; Line: 8]      if (session.getAttribute("userCode") == null) //[ /userChaKanShouJi.jsp; Line: 9]      response.sendRedirect("qingdenglu.jsp"); //[ /userChaKanShouJi.jsp; Line: 10]      _writeText(response, out, _wl_block6, _wl_block6Bytes);      _writeText(response, out, _wl_block7, _wl_block7Bytes);      while(it.hasNext()){ ShouJiInfoVo vo=(ShouJiInfoVo)it.next(); //[ /userChaKanShouJi.jsp; Line: 73]        //[ /userChaKanShouJi.jsp; Line: 73]        _writeText(response, out, _wl_block8, _wl_block8Bytes);        out.print(String.valueOf(vo.getNumber()));  //[ /userChaKanShouJi.jsp; Line: 79]        _writeText(response, out, _wl_block9, _wl_block9Bytes);        out.print(String.valueOf(vo.getPhoto()));  //[ /userChaKanShouJi.jsp; Line: 81]        _writeText(response, out, _wl_block10, _wl_block10Bytes);        out.print(String.valueOf(a=new String(vo.getName().getBytes("8859_1"))));  //[ /userChaKanShouJi.jsp; Line: 85]        _writeText(response, out, _wl_block11, _wl_block11Bytes);        out.print(String.valueOf(vo.getModel()));  //[ /userChaKanShouJi.jsp; Line: 89]        _writeText(response, out, _wl_block12, _wl_block12Bytes);        out.print(String.valueOf(a=new String(vo.getYanSe().getBytes("8859_1"))));  //[ /userChaKanShouJi.jsp; Line: 90]        _writeText(response, out, _wl_block13, _wl_block13Bytes);        out.print(String.valueOf(vo.getDaXiao()));  //[ /userChaKanShouJi.jsp; Line: 91]        _writeText(response, out, _wl_block14, _wl_block14Bytes);        out.print(String.valueOf(vo.getZhongLiang()));  //[ /userChaKanShouJi.jsp; Line: 92]        _writeText(response, out, _wl_block15, _wl_block15Bytes);        out.print(String.valueOf(vo.getXiangXiJieShao()));  //[ /userChaKanShouJi.jsp; Line: 93]        _writeText(response, out, _wl_block16, _wl_block16Bytes);        out.print(String.valueOf(vo.getPrice()));  //[ /userChaKanShouJi.jsp; Line: 96]        _writeText(response, out, _wl_block17, _wl_block17Bytes);      } //[ /userChaKanShouJi.jsp; Line: 119]      //[ /userChaKanShouJi.jsp; Line: 119]      _writeText(response, out, _wl_block18, _wl_block18Bytes);    } 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 + -