Web Database Connection Considerations

Source: Internet
Author: User
Tags web database

Java learning process, java instance 300== "html==" css (js) = = "Javaweb

See Javaweb Book: From the construction of javaweb program = = "Development environment Configuration = =" JSP page elements (directive: page,include,taglib;

Script: <% script%>;<%= expression%>;<%! declaration%>;

JSP action Element:<jsp:include>;<jsp:usebean>;<jsp:forward>;<jsp:set/getproperty> such as

JSP built-in objects (Request;response;out;session;application;page and Config;pagecontext;exception)

JavaBean

Database access technology (with special emphasis on:

1. Installing MySQL requires the installation of a database and a visual interface, except that the SQL Server system has its own driver package, and other databases need to download the driver package (e.g. MySQL database driver package "Mysql-connector-java-5.0.8.jar");

2. Database connection steps:

⑴ Load Driver Package: Class.forName ("Com.mysql.jdbc.Driver") or

Driver driver=new com.mysql.jdbc.Driver ();

Drivermanager.registerdriver (driver);

⑵ Connection Database: Connection conn=drivermanager.getconnection ("connection statement");)

Web Database Connection Considerations

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.