Tomcat Link Database

Source: Internet
Author: User

If the config.properties from SQL Server to the MYSQL,SRC directory needs to be changed multiple places:

First, user name and password, note the user name and password do not add single quotation marks

Second, the database of the driver must be changed back

#DataBase_Driver =com.microsoft.sqlserver.jdbc.sqlserverdriver
Database_driver=com.mysql.jdbc.driver

Third, the constant file under the common package, the penultimate line, the relevant SQL Server to be changed to MySQL

URL = "jdbc:mysql://" + Database_add + ": 3306/" + database_name + "? relaxautocommit=true&zerodatetimebehavior= Converttonull ";

Four, the corresponding Lib class library first test to Web-info re-introduced, SERVLET-API to be introduced separately

When you change to MySQL, Mysql-connector-java-5.1.15-bin.jar This package don't forget to introduce

Vi. index.jsp as Welcome interface

Seven, a new servlet will be automatically registered under Web-info, do not create a new javafile. Note Create a new StartServer file under the servlet and set the priority to 1

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Tomcat Link Database

Related Article

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.