Oracle Configuration and Server.xml configuration

Source: Internet
Author: User

*

The 1,java Web project can be deployed to Tomcat, or it can be mapped to a project's actual directory by configuring Server.xml, so there is no project under Tomcat's WebApps directory, the following is the configuration in Server.xml

<ContextPath= "/myfirst"DocBase= "E:\myJava\project2\first\WebRoot"Debug= "0"reloadable= "false">               <Resourcename= "Jdbc/oracle"type= "Javax.sql.DataSource"username= "AAA"Password= "Password"Driverclassname= "Oracle.jdbc.driver.OracleDriver"Maxidle= "2"maxwait= "the"URL= "Jdbc:oracle:thin: @localhost: 1521:orcl"maxactive= "4" /></Context>

The project name is first, mapped to Myfirst, and later accessed directly through

Http://localhost:80/myfirst can

Configuration in the Tnsnames.ora of the 2,oracle

Info = (  DESCRIPTION = (    address_list = (      ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521    )) 
    
      (Connect_data =      (service_name = ORCL)    )  )
    

Note: 1, because here

(service_name = ORCL)
(HOST = localhost)

So in Server.xml

Url= "Jdbc:oracle:thin: @localhost: 1521:orcl"
If Plsql is connected to a database of other hosts, such as Host=192.168.1.101
, Service_name=info,
Then Url= "Jdbc:oracle:thin:@192.168.1.101:info"

The database corresponds to the service_name

*

Oracle Configuration and Server.xml configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.