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

📄 __index.java

📁 使用J2EE实现了软件园的下载和上传功能
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    // 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=gb2312");    out = pageContext.getOut();    JspWriter _originalOut = out;    
    javax.servlet.http.HttpSession session = request.getSession(true);    
    
    
    try { // error page try block            response.setContentType("text/html;charset=gb2312");            _writeText(response, out, _wl_block0, _wl_block0Bytes);      _writeText(response, out, _wl_block1, _wl_block1Bytes);      //INCLUDE /top.jsp //[ /index.jsp; Line: 3]      _writeText(response, out, _wl_block2, _wl_block2Bytes);      _writeText(response, out, _wl_block3, _wl_block3Bytes);      _writeText(response, out, _wl_block4, _wl_block4Bytes);      //[ /index.jsp; Line: 64]      int i = 0; //i:总个数 //[ /index.jsp; Line: 65]      try { //[ /index.jsp; Line: 66]        Context ic = new InitialContext(); //[ /index.jsp; Line: 67]        Object obj = ic.lookup("softwareRemote"); //[ /index.jsp; Line: 68]        software.softwareRemoteHome home = (software.softwareRemoteHome) javax.rmi.PortableRemoteObject.narrow(obj, software.softwareRemoteHome.class); //[ /index.jsp; Line: 69]        Collection c = home.findAll(); //[ /index.jsp; Line: 70]        Collection c2 = home.getTypes(); //[ /index.jsp; Line: 71]        Iterator i2 = c2.iterator(); //[ /index.jsp; Line: 72]        String strType = ""; //[ /index.jsp; Line: 73]        while (i2.hasNext()) { //[ /index.jsp; Line: 74]          strType = i2.next().toString(); //[ /index.jsp; Line: 75]          Collection c3 = home.getTypeSoftwares(strType); //[ /index.jsp; Line: 76]          //[ /index.jsp; Line: 77]          //[ /index.jsp; Line: 77]          _writeText(response, out, _wl_block5, _wl_block5Bytes);          out.print(String.valueOf(codeString(strType)));  //[ /index.jsp; Line: 79]          _writeText(response, out, _wl_block6, _wl_block6Bytes);          out.print(String.valueOf(c3.size()));  //[ /index.jsp; Line: 79]          _writeText(response, out, _wl_block7, _wl_block7Bytes);          //[ /index.jsp; Line: 81]        } //[ /index.jsp; Line: 82]        i = c.size(); //[ /index.jsp; Line: 83]      } //[ /index.jsp; Line: 84]      catch (Exception ex) { //[ /index.jsp; Line: 85]        ex.printStackTrace(); //[ /index.jsp; Line: 86]      } //[ /index.jsp; Line: 87]      //[ /index.jsp; Line: 88]      //[ /index.jsp; Line: 88]      _writeText(response, out, _wl_block8, _wl_block8Bytes);      out.print(String.valueOf(i));  //[ /index.jsp; Line: 91]      _writeText(response, out, _wl_block9, _wl_block9Bytes);      //[ /index.jsp; Line: 105]      try{ //[ /index.jsp; Line: 106]        Context ic = new InitialContext(); //[ /index.jsp; Line: 107]        Object obj = ic.lookup("softwareRemote"); //[ /index.jsp; Line: 108]        software.softwareRemoteHome home = (software.softwareRemoteHome)PortableRemoteObject.narrow(obj, software.softwareRemoteHome.class); //[ /index.jsp; Line: 109]        Collection cr=home.getTop5(); //[ /index.jsp; Line: 110]        System.out.println("cr.size()"+cr.size()); //[ /index.jsp; Line: 111]        Iterator ir=cr.iterator(); //[ /index.jsp; Line: 112]        while(ir.hasNext()){ //[ /index.jsp; Line: 113]          software.softwareRemote sr=(software.softwareRemote)ir.next(); //[ /index.jsp; Line: 114]          String str=new String(sr.getSoftwareName().getBytes("iso8859-1"),"gb2312"); //[ /index.jsp; Line: 115]          int ir2=sr.getSoftwareDownloadTime().intValue(); //[ /index.jsp; Line: 116]          //[ /index.jsp; Line: 116]          _writeText(response, out, _wl_block10, _wl_block10Bytes);          out.print(String.valueOf(str));  //[ /index.jsp; Line: 122]          _writeText(response, out, _wl_block11, _wl_block11Bytes);          out.print(String.valueOf(str));  //[ /index.jsp; Line: 122]          _writeText(response, out, _wl_block12, _wl_block12Bytes);          out.print(String.valueOf(ir2));  //[ /index.jsp; Line: 124]          _writeText(response, out, _wl_block13, _wl_block13Bytes);          //[ /index.jsp; Line: 126]        } //[ /index.jsp; Line: 127]      }catch(Exception ex){ //[ /index.jsp; Line: 128]        ex.printStackTrace();} //[ /index.jsp; Line: 129]      _writeText(response, out, _wl_block14, _wl_block14Bytes);      //[ /index.jsp; Line: 143]      try { //[ /index.jsp; Line: 144]        javax.naming.Context ic = new javax.naming.InitialContext(); //[ /index.jsp; Line: 145]        Object obj = ic.lookup("softwareRemote"); //[ /index.jsp; Line: 146]        software.softwareRemoteHome home = (software.softwareRemoteHome) javax.rmi.PortableRemoteObject.narrow(obj, software.softwareRemoteHome.class); //[ /index.jsp; Line: 147]        java.util.Collection c = home.findAll(); //[ /index.jsp; Line: 148]        //java.util.Iterator i=c.iterator(); //[ /index.jsp; Line: 149]        Object o[] = c.toArray(); //[ /index.jsp; Line: 150]        //System.out.println("c.size()"+c.size()); //[ /index.jsp; Line: 151]        // System.out.println("o.length"+o.length); //[ /index.jsp; Line: 152]        if (o.length >= 5) { //[ /index.jsp; Line: 153]          //int k=c.size()-4; //[ /index.jsp; Line: 154]          for (int j = o.length - 5; j <= o.length - 1; j++) { //[ /index.jsp; Line: 155]            //software.softwareRemote s=(software.softwareRemote)i.next(); //[ /index.jsp; Line: 156]            software.softwareRemote s = (software.softwareRemote) o[j]; //[ /index.jsp; Line: 157]            //System.out.println(s.getSoftwareType()); //[ /index.jsp; Line: 158]            //[ /index.jsp; Line: 159]            //[ /index.jsp; Line: 159]            _writeText(response, out, _wl_block15, _wl_block15Bytes);            out.print(String.valueOf(new String(s.getSoftwareType().trim().toString().getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 163]            _writeText(response, out, _wl_block16, _wl_block16Bytes);            out.print(String.valueOf(new String(s.getSoftwareType().toString().getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 163]            _writeText(response, out, _wl_block17, _wl_block17Bytes);            out.print(String.valueOf(new String(s.getSoftwareName().toString().getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 164]            _writeText(response, out, _wl_block18, _wl_block18Bytes);            out.print(String.valueOf(new String(s.getSoftwareName().toString().getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 164]            _writeText(response, out, _wl_block19, _wl_block19Bytes);            out.print(String.valueOf(s.getSoftwareID().substring(0,8)));  //[ /index.jsp; Line: 165]            _writeText(response, out, _wl_block20, _wl_block20Bytes);            //[ /index.jsp; Line: 168]          }} else { //[ /index.jsp; Line: 169]          for (int j = 0; j <= o.length - 1; j++) { //[ /index.jsp; Line: 170]            software.softwareRemote s = (software.softwareRemote) o[j]; //[ /index.jsp; Line: 171]            //[ /index.jsp; Line: 172]            //[ /index.jsp; Line: 172]            _writeText(response, out, _wl_block21, _wl_block21Bytes);            out.print(String.valueOf(new String(s.getSoftwareType().toString().getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 175]            _writeText(response, out, _wl_block22, _wl_block22Bytes);            out.print(String.valueOf(new String(s.getSoftwareType().toString().getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 175]            _writeText(response, out, _wl_block23, _wl_block23Bytes);            out.print(String.valueOf(new String(s.getSoftwareName().toString().getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 176]            _writeText(response, out, _wl_block24, _wl_block24Bytes);            out.print(String.valueOf(new String(s.getSoftwareName().toString().getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 176]            _writeText(response, out, _wl_block25, _wl_block25Bytes);            //[ /index.jsp; Line: 179]          } //[ /index.jsp; Line: 180]        } //[ /index.jsp; Line: 181]        Collection c2 = home.getTypes(); //[ /index.jsp; Line: 182]        //System.out.println("TypeSize"+c2.size()); //[ /index.jsp; Line: 183]        Iterator i2 = c2.iterator(); //[ /index.jsp; Line: 184]        String strType = "", strSoftware; //[ /index.jsp; Line: 185]        while (i2.hasNext()) { //[ /index.jsp; Line: 186]          strType = i2.next().toString(); //[ /index.jsp; Line: 187]          //strType=new String(strType.getBytes("iso8859-1"),"gb2312"); //[ /index.jsp; Line: 188]          //[ /index.jsp; Line: 189]          //[ /index.jsp; Line: 189]          _writeText(response, out, _wl_block26, _wl_block26Bytes);          out.print(String.valueOf(new String(strType.getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 192]          _writeText(response, out, _wl_block27, _wl_block27Bytes);          out.print(String.valueOf(new String(strType.getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 192]          _writeText(response, out, _wl_block28, _wl_block28Bytes);          //[ /index.jsp; Line: 196]          Collection c3 = home.getTypeSoftwares(strType); //[ /index.jsp; Line: 197]          //System.out.print("strType:"+strType+"||"+strType.length()); //[ /index.jsp; Line: 198]          Iterator i3 = c3.iterator(); //[ /index.jsp; Line: 199]          while (i3.hasNext()) { //[ /index.jsp; Line: 200]            strSoftware = i3.next().toString(); //[ /index.jsp; Line: 201]            //[ /index.jsp; Line: 202]            //[ /index.jsp; Line: 202]            _writeText(response, out, _wl_block29, _wl_block29Bytes);            out.print(String.valueOf(new String(strSoftware.getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 205]            _writeText(response, out, _wl_block30, _wl_block30Bytes);            out.print(String.valueOf(new String(strSoftware.getBytes("iso8859-1"),"gb2312")));  //[ /index.jsp; Line: 205]            _writeText(response, out, _wl_block31, _wl_block31Bytes);            //[ /index.jsp; Line: 208]          } //[ /index.jsp; Line: 209]        } //[ /index.jsp; Line: 210]      } catch (Exception ex) { //[ /index.jsp; Line: 211]        ex.printStackTrace(); //[ /index.jsp; Line: 212]      } //[ /index.jsp; Line: 213]      //[ /index.jsp; Line: 214]      //[ /index.jsp; Line: 214]      _writeText(response, out, _wl_block32, _wl_block32Bytes);      //INCLUDE /foot.jsp //[ /index.jsp; Line: 222]      _writeText(response, out, _wl_block33, _wl_block33Bytes);      _writeText(response, out, _wl_block34, _wl_block34Bytes);    } 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 + -