易截截图软件、单文件、免安装、纯绿色、仅160KB

从jdk安装到jsp连接oracle数据库的相关配置

1.安装jdk(版本6u7);
  2.配置jdk环境变量(安装目录:D:\tools\java\jdk1.6.0_07):
  1). JAVA_HOME = D:\tools\java\jdk1.6.0_07;
  2). Path的最前面追加"D:\tools\java\jdk1.6.0_07\bin;D:\tools\java\jre1.6.0_07\bin";
  3). CLASSPATH = D:\tools\java\jdk1.6.0_07\lib;D:\tools\java\jdk1.6.0_07\lib\tools.jar;
  3.安装 tomcat(版本6.0.20)
  4.配置tomcat环境变量(安装目录:D:\tools\tomcat6.0)
  1).CATALINA_HOME=D:\tools\tomcat6.0;
  2).CATALINA_BASE=D:\tools\tomcat6.0;
  3).CLASSPATH后面追加"%CATALINA_HOME%\lib\servlet-api.jar;"
  5.安装oracle数据库(版本10g)
  数据库名:orcl
  用户名:mydata
  密码:oracle
  6.配置tomcat与oracle的连接
  1).D:\tools\tomcat6.0\conf\server.xml追加如下内容:
  <Context path="/test" reloadable="true" docBase="D:\tools\tomcat6.0\webapps\test" debug="0" >
  <Resource name="jdbc/oracle" auth="Container" type="javax.sql.DataSource"
  maxActive="5" maxIdle="4" maxWait="10000"
  username="mydata" password="oracle" driverClassName="oracle.jdbc.driver.OracleDriver"
  url="jdbc:oracle:thin:@127.0.0.1:1521:ORCL"/>
  </Context>
  说明:①、path="/test"(/test为tomcat中webapps目录下的工程文件夹)
  ②、docBase="D:\tools\tomcat6.0\webapps\test"(path中工程文件夹所在的绝对路径)
  ③、username="mydata"(oracle数据库的用户名)
  ④、password="oracle"(oracle数据库的密码)
  ⑤、url="jdbc:oracle:thin:@127.0.0.1:1521:ORCL"/>(ORCL为oracle数据库名)
  2).
  在D:\tools\tomcat6.0\lib文件夹里放入oracle驱动文件ojdbc14.jar(此文件可在网上下载)
  3).在webapps下新建工程文件夹test,在test文件夹下新建WEB-INF文件夹和test.jsp文件;
  在WEB-INF文件夹下新建lib文件夹和web.xml文件;在lib文件夹下放入oracle驱动文件
  ojdbc14.jar(此文件可在网上下载)
web.xml文件内容如下:
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!--
  Copyright 2004 The Apache Software Foundation
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file ex


相关文档:

Oracle游标实用

  declare
sqlstring varchar2(100);
emprow emp_bak%rowtype;
myno emp_bak.empno%type;
begin

--sqlstring:='create table emp_bak as select * from emp';

sqlstring:='select * from emp_bak where empno=:myno and sal>:mysal';

myno:='&请输入员工编号';

--动态SQ ......

Oracle存储过程,函数。

--在应用程序中往往有些固定的数据库操作,我们常常为致谢固定的操作定义了一些存储过程。这些存储过程不仅
--可以简化客户端的应用程序的开发和维护。而且还可以提高应用的运行性能。
-- 创建存储过程的语法。
create [or replace] procedure <过程名>[(参数)]
is|as
[局部变量声明]
begin
......

Exam : Oracle 1Z0 051

Exam : Oracle 1Z0-051
Title : Oracle Database: SQL Fundamentals I
1. View the Exhibit to examine the description for the SALES table.
Which views can have all DML operations performed on it? (Choose all that apply.)
A. CREATE VIEW v3
AS SELECT * from SALES
WHERE cust_id = 2034
WITH CHECK OPTI ......

servlet、jsp中获得项目绝对路径

servlet中获得项目绝对路径
String filePath=this.getServletConfig().getServletContext().getRealPath("/");
根目录所对应的绝对路径:request.getServletPath();
文件的绝对路径 :request.getSession().getServletContext().getRealPath(request.getRequestURI())
当前web应用的绝对路径 :servletConfig.getServletCo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号