Reprint please indicate source: http://blog.csdn.net/wu_wxc/article/details/48651251
This article is from "Wu Xiaocheng's CSDN blog"
Tools:
Eclipse official website Download: http://www.eclipse.org/downloads/
Apache Tomcat Download: http://tomcat.apache.org/
JDK Download: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Configuration of the JDK environment variable see: http://blog.csdn.net/wu_wxc/article/details/46846387
Install the JDK first and configure the environment variables.
Launching Apache also requires a JDK environment.
Eclipse uses a compressed version. Just unzip the line.
Tomcat Apache is also a compressed version, after decompression configuration environment variables can be started
Then enter: http://localhost:8080/or: http://127.0.0.1:8080/in the address bar of the browser
Configuring the Tomcat environment variable
Right-click on the desktop: this PC >> properties >> in advanced environment settings >> environment variables >> under System variables (S) Select "Edit (I) ..." >> variable name (N): Catalina_home, Variable value fill in: The location of your Tomcat decompression, and then determine all the way down.
For example, my
Then double-click the Startup.bat file in the bin directory to open the Tomcat server, enter http://localhost:8080/in the Address bar or: http://127.0.0.1:8080/
can be accessed, to shut down the server in the Bin directory double-click Shutdown.bat Close, if you close the Startup.bat open window, the product will also be occupied
Home page of Apache
Create Javaweb
Open Eclipse, select Java EE view
File--new--other--web--dynamic Web project, Dynamic Web projects
Fill in the project name and select the running environment Tomcat
Select the installed Tomcat,
Select the Tomcat directory and the installed JDK
Create a Web page---jsp file under WebContent
Run the project
Right-click the project and select Run as----run on Server
Select the Tomcat server (Eclipse comes with Tomcat), click Finish, if Tomcat starts when you run the program, the port is occupied and you need to stop the Tomcat service
Put the address in the browser open, you can also see in the browser
Port issues
Several ports (8005, 8080, 8009) required by Tomcat v8.0 Server at localhost is already in use. The server may already is running in another process, or a system process could be using the port. To start this server you'll need to stop the other process or change the port number (s).
Modify the Port method, double-click Servers, open the overview view, the ports three port number is changed, generally +1
Then save, restart the server, and then the browser input http://localhost:8888/can be accessed, running in eclipse will not be an error
If you delete a project and its servers file, re-create a project to run, there will be an error, just need to put its servers also deleted on the line
Resource '/servers ' does not exist
Javaweb development environment to build eclipse configuration Tomcat