Eclipse makes a simple landing interface with a JDBC-connected database

Source: Internet
Author: User
Tags html tags tomcat server

Do Web site development, requires a variety of collocation, front-desk technology can use PHP, ASP, JSP, ASP, CGI and any one;

The basic language needs to use the most is Html/css, JS, JAVA, XML these, HTML/CSS+JS can achieve the rendering of the interface, while JAVA can do background data processing, XML is also a medium that can be used as a data transfer (think: XML is so much more powerful than HTML, why it doesn't replace HTML.) );

This article through the simple JSP file implementation landing interface, so only used the following technology: HTML/CSS, simple demo do not do CSS style, can learn by themselves, improve the source code JavaScript MySQL use (with the help of Visual window) JDBC Connection database (go to w3c/ Beginner Tutorial Learn it)

A variety of HTML tags are used in the project, such as <input>, <form>, <table>, etc., and the project files are used. JSP file, if you have encountered the label attributes do not understand the situation please Baidu (do not need to memorize, with more natural can remember);

The built-in objects used inside and the JDBC module are very poorly understood, such as useful (e.g., response), and the explanation is wrong.

The tools used in this project are as follows: Myeclipse/eclipse (Java EE version) mysql5.7+sqlyog mysql driver package (click to download) Jstl library (click to download) chrome/ie (F12 key) Tomcat9.0 jdk1.8

You can also try other databases and tools Oh. Enter Project two below, configure the Tomcat server

You need to configure the JDK environment variables and install tomcat, you may need to develop a JRE directory, which is usually detected automatically, go to not as a Tomcat installation directory to change, leaving the default next is to choose the installation directory, The Tomcat directory after installation cannot be arbitrarily moved or renamed, otherwise it will severely affect the Tomcat service failed to open.

To open Eclipse, configure the server item according to the link below, and note that when selecting the Tomcat version, please adjust it to your own version. I always see people pretending to be Tomcat9.0, but when the lower version is used, the language is silent, sometimes the eclipse version may be different from the interface, please identify yourself.

Baidu Experience: "View" three, create a project Firstproject

Open Eclipse, create the Dynamic Web project "Dynamic Web Projects", enter the name and click "Done", the project directory structure is probably the same:

Directory Webroot is the root of the Web site, we create a page file to be placed under this directory to properly be loaded and displayed by Tomcat, the Web-inf directory of the Lib directory to hold the jar package used in this project, where three jar files are used, is the JDBC driver package and the JSTL package downloaded above, copied to Lib, and added to the build path: Right-click Jar Package-build Path-add to build path. four, landing page login.jsp

The contents of the file are as follows:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 <%@ page language= "java" contenttype= "text/html; Charset=utf-8 "pageencoding=" UTF-8 "%>
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.