Move your web app to Tongweb__web

Source: Internet
Author: User
Tags port number

There are only migration instructions for the Web App. This paper also introduces the use and configuration of kingbase data sources in some tongweb.

Settings for Java_home:

To start tongweb correctly, you need to set the value of Java_home in the system environment variable

Kingbase Database driver Loading:

The tongweb does not have a JDBC database driver, it needs to be added manually, the database-driven jar package is copied into the Tongweb_home/lib, and the Tongweb is restarted.

Configuration of data sources in Tongweb:

Start Tongweb, enter the Tongweb management console via HTTP://LOCALHOST:8001/, Default User/password: admin/tongweb.

Click on the console to the right of the database service, Tongweb has a default hypersonic data source, tap new will appear the Configuration Data Source window, one by one, fill in the required configuration items:

1. Datasource.name = DSName
The Jndi name of the data source, which is referenced in Teas-web.xml, and hibernate hibernate. The properties will also be used indirectly to this value

2. Datasource.url = Jdbc:kingbase://127.0.0.1:54321/test
URL for database connection

3. Datasource.classname = Com.kingbase.driver
The database driver used, this is the temporary use of the Big Gold Warehouse database

4. Other properties are set according to their respective environment

Add Teas-web.xml:

Add a tongweb configuration file in Webconent/web-inf teas-web.xml

<?xml version= "1.0" encoding= "Iso-8859-1"?>

<twweb>

<connchnl>

<channel>

<enabled>yes</enabled>

</channel>

<connection>

<type>http</type>

<port>8030</port> <!-port number, if not set to 8008-->

<threadtimeout>300</threadtimeout>

<clienttimeout>30</clienttimeout>

<numthreads>200</numthreads>

<queuesize>400</queuesize>

</connection>

</connchnl>

<resource-ref>

<res-ref-name>localdsname</res-ref-name> the Jndi name used in the <!-application--

<jndi-name>dsname</jndi-name> <!-The name of the data source configured in Tongweb--

</resource-ref>

</twweb>

Note The Teas-web.xml file is not required, but the port number is specified as 8008, and because the system uses JNDI to bind the data source, the file is required to complete the resource designation. Where Res-ref-name should match the Hibernate.connection.datasource name in Hibernate.properties. The jndi-name should correspond to the name of the data source configured in Tongweb. In addition, the context of the Web application should also be specified in the file, but it is not clear how to set the default to use the name of the war package, that is, Webapp.war, then the context is localhost:8008/webapp/index.jsp.

To deploy a web app:

Copy the package of the war package directly to tongweb_home/installed/to complete the publication, if you publish it in a folder, you can copy the folder into the tongweb_home/installed/temp.

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.