Build a Java web development environment under MyEclipse

Source: Internet
Author: User
Tags tomcat server

1. Preparation

Download the software first: myeclipse:http://www.xiazaiba.com/html/23858.html

Tomcat:http://files.cnblogs.com/files/linmingjun/apache-tomcat-7.0.59.zip

SQL Server 2008:HTTP://PAN.BAIDU.COM/S/1EQINRXC

SQL Server Installation Documentation:

Jdk:http://dwz.cn/guccy

Sqljdbc4:http://files.cnblogs.com/files/linmingjun/sqljdbc4.zip

2. Preparing the JDK

"My Computer", "Properties", "Advanced system Settings", "Environment variables".

First step: Create a new system variable Java_home:

Step Two: Create a new system variable classpath:.;   %java_home%\lib; (Copy and paste)

Step three: At the end of the value of path, add the following:%java_home%\bin; (The original Path value has no semicolon to remember to add)

JDK installation complete, run->cmd input Java

Installation Complete

Ii. installation of Tomcat

Configure the Tomcat environment variable: "My Computer" right--"properties", "Advanced system Settings", "Environment variables".

New system variable catalina_home:d:\apache-tomcat-7.0.59;


The addition of the value of the system variable classpath:;%catalina_home%\common\lib\servlet-api.jar;

Third, installation MyEclipse

Direct installation

Iv. MyEclipse deployment of Tomcat servers

Menu bar: windows->preference

Search: Tomcat Select Tomcat 7.x as set up to locate Tomcat home directory in the Tomcat installation location:

The myeclipse deployment Tomcat Server environment is built!

V. JSP connection to the SQL Server database

Download Sqljdbc4.zip configuration SQLJDBC environment variable: "My Computer" right--"properties", "Advanced system Settings", "Environment variables".

Edit the system variable Classpath:d:\java\sqljdbc4.jar; (Copy and paste in the back)

Import: Sqljdbc4.jar to Java Web projects (drag files directly into the Lib folder)

Go to "My Computer"-"Control Panel"-"System and security"-"Administrative Tools"-"services"

Stop the SQL Server about the service , and remember that it is "stopped"

Go to "My Computer"-"Control Panel"-"System and security"-"Administrative Tools"-"Computer Management"

go to SQL Server Configuration Manager-"SQL Server network Configuration"-"SQLExpress Protocol"- "

"Click TCP/IP"-"Enter IP address"

Select IP Address

Test connection

To import a SQL package:

<%@ page import= "java.sql.*"%>

Connection statement:

<%
Class.forName ("Com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection dbconn = drivermanager.getconnection ("Jdbc:sqlserver://127.0.0.1:1433;databasename=wlpt", "sa", " 12345678 ");

Out.println ("Success");
%>

Http://www.cnblogs.com/linmingjun/p/4413965.html

Build a Java web development environment under MyEclipse

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.