摘要(Abstract)
Oracle Database,又名Oracle RDBMS,或简称Oracle。是甲骨文公司的一款关系数据库管理系统。它是在数据库领域一直处于领先地位的产品。可以说Oracle数据库系统是目前世界上流行的关系数据库管理系统,系统可移植性好、使用方便、功能强,适用于各类大、中、小、微机环境。它是一种高效率、可靠性好的 适应高吞吐量的数据库解决方案。1、完整的数据管理功能: [1]
1)数据的大量性
2)数据的保存的持久性
3)数据的共享性
4)数据的可靠性
2、完备关系的产品:
1)信息准则---关系型DBMS的所有信息都应在逻辑上用一种方法,即表中的值显式地表示;
2)保证访问的准则
3)视图更新准则---只要形成视图的表中的数据变化了,相应的视图中的数据同时变化
4)数据物理性和逻辑性独立准则
3、分布式处理功能:
ORACLE数据库自第5版起就提供了分布式处理能力,到第7版就有比较完善的分布式数据库功能了,一个ORACLE分布式数据库由oraclerdbms、sql*Net、SQL*CONNECT和其他非ORACLE的关系型产品构成。
4、用ORACLE能轻松的实现数据仓库的操作。
这是一个技术发展的趋势,不在这里讨论
主题(Topic)
项目(Project)
2.jsp动作元素 J SP动作可以动态地插入文件、重用JavaBean组件、把用户重定向到另外的页面、为Java插件生成HTML代码。 所以动作要素都有两个属性:id属性和scope属性 id属性: id属性是动作元素的唯一标识,可以在JSP页面中引用。动作元素创建的id值可以通过PageContext来调用。 scope属性: 该属性用于识别动作元素的生命周期。 id属性和scope属性有直接关系,scope属性定义了相关联id对象的寿命。 scope属性有四个可能的值: (a) page, (b)request, (c)session, 和 (d) application。 (1)include 动作元素用来包含静态和动态的文件。该动作把指定文件插入正在生成的页面。语法格式如下 jsp:include page="relative URL" flush="true" /> (2)useBean动作元素 jsp:useBean动作用来装载一个将在JSP页面中使用的JavaBean。 在类载入后,我们既可以通过 jsp:setProperty 和 jsp:getProperty 动作来修改和检索bean的属性。 (3)jsp:setProperty动作元素 jsp:setProperty用来设置已经实例化的Bean对象的属性 (4)jsp:getProperty动作元素 jsp:getProperty动作提取指定Bean属性的值,转换成字符串,然后输出。 (5) 动作元素 jsp:forward动作把请求转到另外的页面。jsp:forward标记只有一个属性page。语法格式如下所示: jsp:forward page="Relative URL" /> javaBeans作用域范围 page:仅在当前页面有效 request:可通过Request.getAttribute取得javaBean对象 session:可通过session.getAttribute取得javaBean对象 application:可通过application.getAttribute取得javaBean对象 applicaition: (1)动作元素获取: 用户名:
密码:
(2)内置对象获取(要先引入Users的包) 用户名:<%=((Users)application.getAttribute("myUsers")).getUsername() %>
密码:<%=((Users)application.getAttribute("myUsers")).getPassword() %> session:就是applicaton中的scope="session" 用户名:<%=((Users)session.getAttribute("myUsers")).getUsername() %>
密码:<%=((Users)session.getAttribute("myUsers")).getPassword() %> request:(不能够直接使用超链接) <%--服务器内置跳转(request) --%> <% request.getRequestDispatcher("testScope.jsp").forward(request,response); %> 用户名:<%=((Users)request.getAttribute("myUsers")).getUsername() %>
密码:<%=((Users)request.getAttribute("myUsers")).getPassword() %> page:无论如何都获取不到javabeans对象 请求转发 请求转发是指将请求再转发到另一资源(一般为JSP或Servlet)。此过程依然在同一个请求范围内,转发后浏览器地址栏内容不变 请求转发使用RequestDispatcher接口中的forward()方法来实现,该方法可以把请求转发到另外一个资源,并让该资源对浏览器的请求进行响应 RequestDispatcher rd = request.getRequestDispatcher(path); rd.forward(request,response); 或request.getRequestDispatcher(path) .forward(request,response); 重定向 重定向是指页面重新定位到某个新地址,之前的请求失效,进入一个新的请求,且跳转后浏览器地址栏内容将变为新的指定地址 重定向是通过HttpServletResponse对象的sendRedirect()来实现,该方法相当于浏览器重新发送一个请求 response.sendRedirect(path); forward动作是转发,跳转到某页面的意思; include动作是包含,在当前页面中包含某页面的意思; JSP读取表单数据: getParameter(): 使用 request.getParameter() 方法来获取表单参数的值 getParameterValues(): 获得如checkbox类(名字相同,但值有多个)的数据。 接收数组变量 ,如checkobx类型 getParameterNames():该方法可以取得所有变量的名称,该方法返回一个Emumeration。 Cookie (1)创建cookies Cookie cookie = new Cookie("key","value"); 设置有效期 cookie.setMaxAge(60*60*24); 将cookie发送至HTTP响应头中 response.addCookie(cookie); (2)读取cookies 需要调用request.getCookies()方法来获得一个javax.servlet.http.Cookie对象的数组,然后遍历这个数组,使用getName()方法和getValue()方法来获取每一个cookie的名称和值 (3)删除cookies 获取一个已经存在的cookie然后存储在Cookie对象中。 将cookie的有效期设置为0。 将这个cookie重新添加进响应头中。" class="topic-tag topic-tag-link">
hwj8168/7.31-jsp
> descriptors = new HashMap(); private static final String MD = "MessageDigest"; private static final String SIG = "Signature"; private static final String KPG = "KeyPairGenerator"; private static final String KG = "KeyGenerator"; private static final String AGP = "AlgorithmParameters"; private static final String KF = "KeyFactory"; private static final String SKF = "SecretKeyFactory"; private static final String CIP = "Cipher"; private static final String MAC = "Mac"; private static final String KA = "KeyAgreement"; private static final String KS = "KeyStore"; private static final String SR = "SecureRandom"; Token getToken() { return this.token; } public SunPKCS11() { super("SunPKCS11-Dummy", 1.8D, "SunPKCS11-Dummy"); this.LOCK_HANDLER = new Object(); throw new ProviderException("SunPKCS11 requires configuration file argument"); } public SunPKCS11(String var1) { this((String)checkNull(var1), (InputStream)null); } public SunPKCS11(InputStream var1) { this(getDummyConfigName(), (InputStream)checkNull(var1)); } private static T checkNull(T var0) { if (var0 == null) { throw new NullPointerException(); } else { return var0; } } private static synchronized String getDummyConfigName() { int var0 = ++dummyConfigId; return "---DummyConfig-" + var0 + "---"; } /** @deprecated */ @Deprecated public SunPKCS11(String var1, InputStream var2) { super("SunPKCS11-" + Config.getConfig(var1, var2).getName(), 1.8D, Config.getConfig(var1, var2).getDescription()); this.LOCK_HANDLER = new Object(); this.configName = var1; this.config = Config.removeConfig(var1); if (debug != null) { System.out.println("SunPKCS11 loading " + var1); } String var3 = this.config.getLibrary(); String var4 = this.config.getFunctionList(); long var5 = (long)this.config.getSlotID(); int var7 = this.config.getSlotListIndex(); boolean var8 = this.config.getNssUseSecmod(); boolean var9 = this.config.getNssUseSecmodTrust(); Module var10 = null; String var13; if (var8) { Secmod var11 = Secmod.getInstance(); DbMode var12 = this.config.getNssDbMode(); String var14; try { var13 = this.config.getNssLibraryDirectory(); var14 = this.config.getNssSecmodDirectory(); boolean var15 = this.config.getNssOptimizeSpace(); if (var11.isInitialized()) { String var16; if (var14 != null) { var16 = var11.getConfigDir(); if (var16 != null && !var16.equals(var14)) { throw new ProviderException("Secmod directory " + var14 + " invalid, NSS already initialized with " + var16); } } if (var13 != null) { var16 = var11.getLibDir(); if (var16 != null && !var16.equals(var13)) { throw new ProviderException("NSS library directory " + var13 + " invalid, NSS already initialized with " + var16); } } } else { if (var12 != DbMode.NO_DB) { if (var14 == null) { throw new ProviderException("Secmod not initialized and nssSecmodDirectory not specified"); } } else if (var14 != null) { throw new ProviderException("nssSecmodDirectory must not be specified in noDb mode"); } var11.initialize(var12, var14, var13, var15); } } catch (IOException var20) { throw new ProviderException("Could not initialize NSS", var20); } List var26 = var11.getModules(); if (this.config.getShowInfo()) { System.out.println("NSS modules: " + var26); } var14 = this.config.getNssModule(); if (var14 == null) { var10 = var11.getModule(ModuleType.FIPS); if (var10 != null) { var14 = "fips"; } else { var14 = var12 == DbMode.NO_DB ? "crypto" : "keystore"; } } if (var14.equals("fips")) { var10 = var11.getModule(ModuleType.FIPS); var9 = true; var4 = "FC_GetFunctionList"; } else if (var14.equals("keystore")) { var10 = var11.getModule(ModuleType.KEYSTORE); var9 = true; } else if (var14.equals("crypto")) { var10 = var11.getModule(ModuleType.CRYPTO); } else if (var14.equals("trustanchors")) { var10 = var11.getModule(ModuleType.TRUSTANCHOR); var9 = true; } else { if (!var14.startsWith("external-")) { throw new ProviderException("Unknown NSS module: " + var14); } int var27; try { var27 = Integer.parseInt(var14.substring("external-".length())); } catch (NumberFormatException var19) { var27 = -1; } if (var27 < 1) { throw new ProviderException("Invalid external module: " + var14); } int var30 = 0; Iterator var17 = var26.iterator(); while(var17.hasNext()) { Module var18 = (Module)var17.next(); if (var18.getType() == ModuleType.EXTERNAL) { ++var30; if (var30 == var27) { var10 = var18; break; } } } if (var10 == null) { throw new ProviderException("Invalid module " + var14 + ": only " + var30 + " external NSS modules available"); } } if (var10 == null) { throw new ProviderException("NSS module not available: " + var14); } if (var10.hasInitializedProvider()) { throw new ProviderException("Secmod module already configured"); } var3 = var10.libraryName; var7 = var10.slot; } this.nssUseSecmodTrust = var9; this.nssModule = var10; File var23 = new File(var3); if (!var23.getName().equals(var3) && !(new File(var3)).isFile()) { String var25 = "Library " + var3 + " does not exist"; if (this.config.getHandleStartupErrors() == 1) { throw new ProviderException(var25); } else { throw new UnsupportedOperationException(var25); } } else { try { if (debug != null) { debug.println("Initializing PKCS#11 library " + var3); } CK_C_INITIALIZE_ARGS var24 = new CK_C_INITIALIZE_ARGS(); var13 = this.config.getNssArgs(); if (var13 != null) { var24.pReserved = var13; } var24.flags = 2L; PKCS11 var28; try { var28 = PKCS11.getInstance(var3, var4, var24, this.config.getOmitInitialize()); } catch (PKCS11Exception var21) { if (debug != null) { debug.println("Multi-threaded initialization failed: " + var21); } if (!this.config.getAllowSingleThreadedModules()) { throw var21; } if (var13 == null) { var24 = null; } else { var24.flags = 0L; } var28 = PKCS11.getInstance(var3, var4, var24, this.config.getOmitInitialize()); } this.p11 = var28; CK_INFO var29 = this.p11.C_GetInfo(); if (var29.cryptokiVersion.major < 2) { throw new ProviderException("Only PKCS#11 v2.0 and later supported, library version is v" + var29.cryptokiVersion); } else { boolean var32 = this.config.getShowInfo(); if (var32) { System.out.println("Information for provider " + this.getName()); System.out.println("Library info:"); System.out.println(var29); } if (var5 < 0L || var32) { long[] var31 = this.p11.C_GetSlotList(false); if (var32) { System.out.println("All slots: " + toString(var31)); var31 = this.p11.C_GetSlotList(true); System.out.println("Slots with tokens: " + toString(var31)); } if (var5 < 0L) { if (var7 < 0 || var7 >= var31.length) { throw new ProviderException("slotListIndex is " + var7 + " but token only has " + var31.length + " slots"); } var5 = var31[var7]; } } this.slotID = var5; CK_SLOT_INFO var33 = this.p11.C_GetSlotInfo(var5); this.removable = (var33.flags & 2L) != 0L; this.initToken(var33); if (var10 != null) { var10.setProvider(this); } } } catch (Exception var22) { if (this.config.getHandleStartupErrors() == 2) { throw new UnsupportedOperationException("Initialization failed", var22); } else { throw new ProviderException("Initialization failed", var22); } } } } private static String toString(long[] var0) { if (var0.length == 0) { return "(none)"; } else { StringBuilder var1 = new StringBuilder(); var1.append(var0[0]); for(int var2 = 1; var2 < var0.length; ++var2) { var1.append(", "); var1.append(var0[var2]); } return var1.toString(); } } public boolean equals(Object var1) { return this == var1; } public int hashCode() { return System.identityHashCode(this); } private static String[] s(String... var0) { return var0; } private static int[] m(long var0) { return new int[]{(int)var0}; } private static int[] m(long var0, long var2) { return new int[]{(int)var0, (int)var2}; } private static int[] m(long var0, long var2, long var4) { return new int[]{(int)var0, (int)var2, (int)var4}; } private static int[] m(long var0, long var2, long var4, long var6) { return new int[]{(int)var0, (int)var2, (int)var4, (int)var6}; } private static void d(String var0, String var1, String var2, int[] var3) { register(new SunPKCS11.Descriptor(var0, var1, var2, (String[])null, var3)); } private static void d(String var0, String var1, String var2, String[] var3, int[] var4) { register(new SunPKCS11.Descriptor(var0, var1, var2, var3, var4)); } private static void register(SunPKCS11.Descriptor var0) { for(int var1 = 0; var1 < var0.mechanisms.length; ++var1) { int var2 = var0.mechanisms[var1]; Integer var3 = var2; Object var4 = (List)descriptors.get(var3); if (var4 == null) { var4 = new ArrayList(); descriptors.put(var3, var4); } ((List)var4).add(var0); } } private void createPoller() { if (this.poller == null) { SunPKCS11.TokenPoller var1 = new SunPKCS11.TokenPoller(this); Thread var2 = new Thread(var1, "Poller " + this.getName()); var2.setDaemon(true); var2.setPriority(1); var2.start(); this.poller = var1; } } private void destroyPoller() { if (this.poller != null) { this.poller.disable(); this.poller = null; } } private boolean hasValidToken() { Token var1 = this.token; return var1 != null && var1.isValid(); } synchronized void uninitToken(Token var1) { if (this.token == var1) { this.destroyPoller(); this.token = null; AccessController.doPrivileged(new PrivilegedAction