最新更新 sitemap 网站制作设计本站搜索
网页设计
国外网站 韩国网站 个人主页 手提袋设计 CSS 网页特效 平面设计 网站设计 Flash CMS技巧 服装网站 php教程 photoshop 画册 服务器选用 数据库 Office
虚拟主机 域名注册 云主机 网页设计 客服QQ:8208442
当前位置:首页 > 编程开发 > jsp教程

jsp编程:JSP用bean获取各种参数

日期:10-15    来源:中国设计秀    作者:cnwebshow.com

1.包:H3F中国设计秀

package beanpackage;H3F中国设计秀

/**H3F中国设计秀
 *H3F中国设计秀
 * @author luciferH3F中国设计秀
 */ H3F中国设计秀
public class SystemPRoperties {H3F中国设计秀
     public String getRuntimeEnvironmentVersion(){H3F中国设计秀
          return System.getProperty("java.version");H3F中国设计秀
     }H3F中国设计秀
     public String getRuntimeEnvironmentVendor(){H3F中国设计秀
          return System.getProperty("java.vendor");H3F中国设计秀
     }H3F中国设计秀

     public String getVmVersion(){H3F中国设计秀
          return System.getProperty("java.vm.version");H3F中国设计秀
     }H3F中国设计秀
     public String getVmVendor(){H3F中国设计秀
          return System.getProperty("java.vm.vendor");H3F中国设计秀
     }H3F中国设计秀
     public String getVmName(){H3F中国设计秀
          return System.getProperty("java.vm.name");H3F中国设计秀
     }H3F中国设计秀

     public String getVmSpecVersion(){H3F中国设计秀
          return System.getProperty("java.vm.specification.version");H3F中国设计秀
     }H3F中国设计秀
     public String getVmSpecVendor(){H3F中国设计秀
          return System.getProperty("java.vm.specification.vendor");H3F中国设计秀
     }H3F中国设计秀
     public String getVmSpecName(){H3F中国设计秀
          return System.getProperty("java.vm.specification.name");H3F中国设计秀
     }H3F中国设计秀

H3F中国设计秀
     public String getRteSpecName(){H3F中国设计秀
          return System.getProperty("java.specification.name");H3F中国设计秀
     }H3F中国设计秀
     public String getRteSpecVersion(){H3F中国设计秀
          return System.getProperty("java.specification.version");H3F中国设计秀
     }H3F中国设计秀
     public String getRteSpecVendor(){H3F中国设计秀
          return System.getProperty("java.specification.vendor");H3F中国设计秀
     }H3F中国设计秀

H3F中国设计秀
     public String getOperatingSystemName(){H3F中国设计秀
          return System.getProperty("os.name");H3F中国设计秀
     }H3F中国设计秀
     public String getOperatingSystemVersion(){H3F中国设计秀
          return System.getProperty("os.version");H3F中国设计秀
     }H3F中国设计秀
     public String getOperatingSystemArchitecture(){H3F中国设计秀
          return System.getProperty("os.arch");H3F中国设计秀
     }H3F中国设计秀
}H3F中国设计秀

 H3F中国设计秀

 H3F中国设计秀

 H3F中国设计秀

2.jsp代码:H3F中国设计秀

<%-- H3F中国设计秀
    Document   : usebeanH3F中国设计秀
    Created on : 2009-10-3, 13:06:24H3F中国设计秀
    Author     : luciferH3F中国设计秀
--%>H3F中国设计秀

<%@page contentType="text/html" pageEncoding="UTF-8"%>H3F中国设计秀
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"H3F中国设计秀
   "http://www.w3.org/TR/html4/loose.dtd">H3F中国设计秀
<jsp:useBean id="properties" class="beanpackage.SystemProperties"/>H3F中国设计秀
<html>H3F中国设计秀
    <head>H3F中国设计秀
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">H3F中国设计秀
        <title>JSP Page</title>H3F中国设计秀
    </head>H3F中国设计秀
    <body>H3F中国设计秀
         Operating System Name:H3F中国设计秀
         <jsp:getProperty name="properties" property="operatingSystemName"/>H3F中国设计秀
         <br>H3F中国设计秀
         Operating System Version:H3F中国设计秀
         <jsp:getProperty name="properties" property="operatingSystemVersion"/>H3F中国设计秀
         <br>H3F中国设计秀
         Operating System Architecture:H3F中国设计秀
         <jsp:getProperty name="properties" property="operatingSystemArchitecture"/>H3F中国设计秀
         <br>H3F中国设计秀
         <br>H3F中国设计秀
         Runtime Environment Version(JDK version):H3F中国设计秀
         <jsp:getProperty name="properties" property="runtimeEnvironmentVersion"/>H3F中国设计秀
         <br>H3F中国设计秀
         Runtime Environment Vendor(JDK vendor):H3F中国设计秀
         <jsp:getProperty name="properties" property="runtimeEnvironmentVendor"/>H3F中国设计秀
         <br>H3F中国设计秀
         <br>H3F中国设计秀
         VM Version:H3F中国设计秀
         <jsp:getProperty name="properties" property="vmVersion"/>H3F中国设计秀
         <br>H3F中国设计秀
         VM Vendor:H3F中国设计秀
         <jsp:getProperty name="properties" property="vmVendor"/>H3F中国设计秀
         <br>H3F中国设计秀
         VM Name:H3F中国设计秀
         <jsp:getProperty name="properties" property="vmName"/>H3F中国设计秀
         <br>H3F中国设计秀
         <br>H3F中国设计秀
         RTE Specification Version:H3F中国设计秀
         <jsp:getProperty name="properties" property="rteSpecVersion"/>H3F中国设计秀
         <br>H3F中国设计秀
         RTE Specification Vendor:H3F中国设计秀
         <jsp:getProperty name="properties" property="rteSpecVendor"/>H3F中国设计秀
         <br>H3F中国设计秀
         RTE Specification Name:H3F中国设计秀
         <jsp:getProperty name="properties" property="rteSpecName"/>H3F中国设计秀
         <br>H3F中国设计秀
         <br>H3F中国设计秀
         VM Specification Name:H3F中国设计秀
         <jsp:getProperty name="properties" property="vmSpecName"/>H3F中国设计秀
         <br>H3F中国设计秀
         VM Specification Version:H3F中国设计秀
         <jsp:getProperty name="properties" property="vmSpecVersion"/>H3F中国设计秀
         <br>H3F中国设计秀
         VM Specification Vendor:H3F中国设计秀
         <jsp:getProperty name="properties" property="vmSpecVendor"/>H3F中国设计秀
    </body>H3F中国设计秀
</html>H3F中国设计秀

 H3F中国设计秀

 H3F中国设计秀

 H3F中国设计秀

3.输出:H3F中国设计秀

Operating System Name: Windows Vista H3F中国设计秀
Operating System Version: 6.0 H3F中国设计秀
Operating System Architecture: x86H3F中国设计秀

Runtime Environment Version(JDK version): 1.6.0_16 H3F中国设计秀
Runtime Environment Vendor(JDK vendor): Sun Microsystems Inc.H3F中国设计秀

VM Version: 14.2-b01 H3F中国设计秀
VM Vendor: Sun Microsystems Inc. H3F中国设计秀
VM Name: Java HotSpot(TM) Client VMH3F中国设计秀

RTE Specification Version: 1.6 H3F中国设计秀
RTE Specification Vendor: Sun Microsystems Inc. H3F中国设计秀
RTE Specification Name: Java Platform API SpecificationH3F中国设计秀

VM Specification Name: Java Virtual Machine Specification H3F中国设计秀
VM Specification Version: 1.0 H3F中国设计秀
VM Specification Vendor: Sun Microsystems Inc. H3F中国设计秀
 H3F中国设计秀

本文引用地址:/bc/article_46569.html
网站地图 | 关于我们 | 联系我们 | 网站建设 | 广告服务 | 版权声明 | 免责声明