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