基于Tomcat+Oracle的应用程序安装配置手册(ZT)

TOMCAT安装

 

第一步:直接运行安装Jakarta-tomcat-4.0.4.exe,我这里默认的安装路径是C:/Apache Tomcat 4.0这时如果单独启动TOMCAT(到Tomca目录下运行startup.bat启动Tomcat或在菜单栏运行start tomcat).

第二步:配置Tomcat,将原文件夹拷贝到D:盘形成D:/PlanManagement,用记事本打开C:/Apache Tomcat 4.0/conf/ server.xml文件修改全文为

注意:红色为笔者加的注释,实际应用时可以删除.

<Server port="8005" shutdown="SHUTDOWN" debug="0">

<Service name="PlanManagement">

<!-决定端口号,此处设置为80是默认端口,如果有冲突[比如IIS的默认Web站点没有停止可以设置为其它:例8080等.] -->

  <Connector port="80" minProcessors="5" maxProcessors="75"

               enableLookups="true" redirectPort="8443"

               acceptCount="10" debug="0" connectionTimeout="-1"/>

<Engine name="PlanManagement" defaultHost="planmanagement" debug="0">

<!-设置虚拟主机:planmanagement主机名应该在C:/WINNT/system32/drivers/etc/hosts文件中有IP映射例: 10.70.38.10       planmanagement,appBase关键字描述应用程序基础目录 -->

<Host name="planmanagement" debug="0" appBase="D:/PlanManagement" unpackWARs="true">

<!-设置当前文档基础目录 -->

        <Context path="" docBase="D:/PlanManagement" debug="0">

<!-设置日志存放目录 -->

          <Logger className="org.apache.catalina.logger.FileLogger" directory="LogDefineByDigitalTitan" prefix="LogDefineByDigitalTitan." suffix=".txt"

              timestamp="true"/>

<!-设置数据库连接池名称为jdbc/OracleDB为程序代码应用. -->

          <Resource name="jdbc/OracleDB" auth="Container" type="javax.sql.DataSource"/>

          <ResourceParams name="jdbc/OracleDB">

                            

            <parameter>

                                    

              <name>factory</name>

                                   

              <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>

                            

            </parameter>

                             

            <parameter>

                                   

              <name>driverClassName</name>

<!-描述Oracle驱动程序目录地址 -->                                   

              <value>oracle.jdbc.driver.OracleDriver</value>

                            

            </parameter>

                            

            <parameter>

                                    

              <name>url</name>

<!-设置Oracle数据库服务器网络地址 -->                                   

              <value>jdbc:oracle:thin:@10.70.38.10:1521:Thor</value>

                            

            </parameter>

                            

            <parameter>

<!-设置Oracle数据库服务器授权用户帐号 -->                                   

              <name>username</name>

                                   

              <value>java</value>

                            

            </parameter>

<!-设置Oracle数据库服务器授权用户口令 -->                            

            <parameter>

                                   

              <name>password</name>

                                   

              <value>java</value>

                            

            </parameter>

                            

            <parameter>

                                   

              <name>maxActive</name>

                                   

              <value>100</value>

                            

            </parameter>

                            

            <parameter>

                                   

              <name>maxIdle</name>

                                   

              <value>98</value>

                            

            </parameter>

                            

            <parameter>

                                   

              <name>maxWait</name>

                                   

              <value>-1</value>

                            

            </parameter>

                            

          </ResourceParams>

        </Context>

      </Host>

    </Engine>

  </Service>

</Server>

另设置系统默认访问页.

用记事本打开C:/Apache Tomcat 4.0/conf/ web.xml文件修改为

注意:红色部分为添加的内容.

......

    <welcome-file-list>

        <welcome-file>index.html</welcome-file>

        <welcome-file>index.htm</welcome-file>

        <welcome-file>index.jsp</welcome-file>

        <welcome-file>Index.jsp</welcome-file>

    </welcome-file-list>

 

</web-app>

确认安装好了Oracle-OracleNT,修改Oracle数据库服务器的IP地址和用户帐号和口令.

确认Oracle的数据库JDBC驱动已经拷贝到C:/Apache Tomcat 4.0/common/lib/Oracle.jar

确认Java豆拷贝到C:/Apache Tomcat 4.0/common/classes目录.

 

启动Tomcat服务器.在浏览器中输入URL

Http://LocalHost/访问

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值