Introduction to the detailed installation configuration of idea, Eclipse and the Tomcat service integration
When it comes to development tools, we all know that each development language pair will correspond to a number of more appropriate development tools, good development tools can help improve the effectiveness of writing code and troubleshooting, such as Java for the first and now use the most people must be eclipse it ~ that specific function how? I was not qualified for a novice, recently saw someone using idea tools to write code, but also said that the idea tool is more efficient than eclipse, and good, so I found on the Internet some of the comparison of thoughts and eclipse documents, after viewing, how much to the idea of some touch, Before you would use eclipse, but idea will not be used, so learn it slowly-after the idea of writing to play the code, if you need to test, it seems that no eclipse integrated tomcat as convenient, so to find the relevant documents, after testing, Idea can integrate the Tomcat service so that it can be easily tested in the process of writing code. Because the idea defaults to testing the Web service, it's cumbersome to run Maven debug and then pop out of the browser automatically, not on the idea page, so it's handy, today, I've made it easy to integrate the Tomcat integration under Eclipse and idea into a single document, For the necessary reference.
First of all, to prepare the environment, whether it is eclipse or idea, you need to configure the Java Runtime Environment, JDK and environment variable configuration. JDK Download We can search the JDK on Baidu, then download to the latest JDK software;
This JDK and JRE are installed under C drive
650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image002" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlfzjQ_S4AAC3FHHaJMU311.jpg" height= "254"/>
The next step is to configure the environment variables
Java_home
C:\Java\jdk1.8.0_31
650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image004" src= "http://s3.51cto.com/wyfs02/M01/6F/05/wKiom1WPlD3AlqXQAAF2RXtYyVc247.jpg" height= "374"/>
CLASSPATH
.; %java_home%\lib;%java_home%\lib\tools.jar
650) this.width=650; "title=" clip_image006 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image006" src= "http://s3.51cto.com/wyfs02/M02/6F/05/wKiom1WPlD3DlYF-AAFhVbVNkO0234.jpg" height= "365"/>
In Path, add:
%java_home%\bin;%java_home%\jre\bin;
650) this.width=650; "title=" clip_image008 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image008" src= "http://s3.51cto.com/wyfs02/M00/6F/05/wKiom1WPlD3yFOkDAAFzTRy6nXg607.jpg" height= "357"/>
Download and install Eclipse again, can also be downloaded from Baidu
Note: When using eclipse, it is important to note that the JDK version and Eclipse version need to be unified (both x64 or x86), or the eclipse will not be started after installation;
Download link:http://www.eclipse.org/
650) this.width=650; "title=" clip_image010 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image010" src= "http://s3.51cto.com/wyfs02/M01/6F/05/wKiom1WPlD3xxLq7AAFBD6PZFBk436.jpg" height= "343"/>
After the installation, we will download Apache for Tomcat, we can also search through Baidu or download on the official website: http://tomcat.apache.org
650) this.width=650; "title=" clip_image012 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image012" src= "http://s3.51cto.com/wyfs02/M02/6F/05/wKiom1WPlD2xIEZVAAHDmLW3MIs796.jpg" height= "356"/>
After downloading, you do not need to install the decompression
650) this.width=650; "title=" clip_image014 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image014" src= "http://s3.51cto.com/wyfs02/M00/6F/05/wKiom1WPlD7ytvO5AAC3DyMlapQ398.jpg" height= "" "/>
We know that the default Tomcat port is 8080, and if you want to modify the configuration options
The Server.xml file under the Conf file in the Tomcat installation directory
650) this.width=650; "title=" clip_image016 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image016" src= "http://s3.51cto.com/wyfs02/M01/6F/05/wKiom1WPlD6gODcXAADdeRamKXs723.jpg" height= "263"/>
Default port 8080
650) this.width=650; "title=" clip_image018 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image018" src= "http://s3.51cto.com/wyfs02/M02/6F/05/wKiom1WPlD6SPvU_AAF82YPZ5fs754.jpg" height= "341"/>
When the above work is ready, we are ready to integrate Tomcat into eclipse
To make it easier for us to create a project
650) this.width=650; "title=" clip_image020 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image020" src= "http://s3.51cto.com/wyfs02/M00/6F/05/wKiom1WPlD7hI0u4AAE3nmiQ_5M405.jpg" height= "344"/>
650) this.width=650; "title=" clip_image022 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image022" src= "http://s3.51cto.com/wyfs02/M01/6F/05/wKiom1WPlD6xsgX6AADeXOYB5SA026.jpg" height= "289"/>
Create a new HTML file for a better presentation
650) this.width=650; "title=" clip_image024 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image024" src= "http://s3.51cto.com/wyfs02/M02/6F/05/wKiom1WPlD6gre67AAE5BG2GQVA133.jpg" height= "353"/>
Click Windows---Preferences
650) this.width=650; "title=" clip_image026 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image026" src= "http://s3.51cto.com/wyfs02/M00/6F/05/wKiom1WPlD6yQfcHAAEQwUFltnI925.jpg" height= "326"/>
Server-àruntime Environment--àadd
650) this.width=650; "title=" clip_image028 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image028" src= "http://s3.51cto.com/wyfs02/M01/6F/05/wKiom1WPlD-wr9CqAAFWU1JyISQ519.jpg" height= "364"/>
Choose Apache Tomcat version, we generally choose the latest
650) this.width=650; "title=" clip_image030 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image030" src= "http://s3.51cto.com/wyfs02/M01/6F/05/wKiom1WPlD_xKw3OAAGL6wRH8z0114.jpg" height= "395"/>
Specify a display name and path for Tomcat
650) this.width=650; "title=" clip_image032 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image032" src= "http://s3.51cto.com/wyfs02/M02/6F/05/wKiom1WPlD-iU7yeAAF5chwteeo432.jpg" height= "404"/>
Confirmation information
650) this.width=650; "title=" clip_image034 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image034" src= "http://s3.51cto.com/wyfs02/M00/6F/05/wKiom1WPlD-SwFRdAAF3KwQQAbM526.jpg" height= "402"/>
Next we configure the project, right-click on the project--àbuild path-àconfigure build Path
650) this.width=650; "title=" clip_image036 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image036" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlf-xpUdfAAFDA4fyEoo316.jpg" height= "403"/>
Library-----Àadd Library
650) this.width=650; "title=" clip_image038 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image038" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlf-jMESRAAFEagMZGhs917.jpg" height= "338"/>
Select Server Runtime
650) this.width=650; "title=" clip_image040 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image040" src= "http://s3.51cto.com/wyfs02/M00/6F/02/wKioL1WPlf_i_8hsAAFNkNA84co568.jpg" height= "352"/>
Select the Apache tomcat you just added
650) this.width=650; "title=" clip_image042 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image042" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlf-Bsk0FAAFMOG-JkRE874.jpg" height= "375"/>
Add complete
650) this.width=650; "title=" clip_image044 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image044" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlf-wnA74AAFoV6g7mG0810.jpg" height= "380"/>
We run the new test hello.html file and we select the Tomcat service to access
650) this.width=650; "title=" clip_image046 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image046" src= "http://s3.51cto.com/wyfs02/M00/6F/02/wKioL1WPlgDBDcb5AAGLJbT66f4505.jpg" height= "404"/>
Add a project that needs to run through Tomcat
650) this.width=650; "title=" clip_image048 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image048" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlgDDpz2EAAEmretkHgY516.jpg" height= "399"/>
We use Tomcat to run
650) this.width=650; "title=" clip_image050 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image050" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlgDhtNnuAAEGiTCsQto512.jpg" height= "337"/>
Normal access
650) this.width=650; "title=" clip_image052 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image052" src= "http://s3.51cto.com/wyfs02/M00/6F/02/wKioL1WPlhej6wKhAAER1edUF5E205.jpg" height= "314"/>
The next step is the installation configuration of idea;
We do not demonstrate the installation of idea here, as installation only needs to be done by default next step.
We can download it via the link below
Http://download-cf.jetbrains.com/idea/ideaIU-14.1.4.exe
http://www.jetbrains.com/idea/
Note: You will be prompted to select the installation path of the JDK at the time of installation, specify
After downloading the installation, we created a new Web project with a testable HTML file.
The idea was also installed, and then we created a new web
650) this.width=650; "title=" clip_image054 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image054" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlheQFRnqAADhQphNHXI784.jpg" height= "347"/>
We press the combo keyboard ctrl+alt+shift+s to open the settings, click Moduls--->dependencies---à+
650) this.width=650; "title=" clip_image056 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image056" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlhewocWPAADHS-ut3I8282.jpg" height= "364"/>
Select the library because it is tomcat, so you must select the type
650) this.width=650; "title=" clip_image058 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image058" src= "http://s3.51cto.com/wyfs02/M02/6F/06/wKiom1WPlFeyLIbZAADABxXKaVE042.jpg" height= "322"/>
Select Apache for Tomcat
650) this.width=650; "title=" clip_image060 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image060" src= "http://s3.51cto.com/wyfs02/M00/6F/06/wKiom1WPlFehRj-SAAEKcG85i6I192.jpg" height= "368"/>
Ok
650) this.width=650; "title=" clip_image062 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image062" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlhfS5vTjAAD7VzD87mg596.jpg" height= "364"/>
Add complete
650) this.width=650; "title=" clip_image064 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image064" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlhfwjcjOAADG7U_-oN8345.jpg" height= "368"/>
Ctrl+alt+s Input Application Filtering service----Click Add
650) this.width=650; "title=" clip_image066 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image066" src= "http://s3.51cto.com/wyfs02/M02/6F/06/wKiom1WPlFjyHiqIAADI_f3wioo471.jpg" height= "351"/>
Application Servers---àtomcat server
650) this.width=650; "title=" clip_image068 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image068" src= "http://s3.51cto.com/wyfs02/M00/6F/02/wKioL1WPlhiSoQkvAADz-kj9jF4543.jpg" height= "363"/>
Specify Apache for Tomcat installation path
650) this.width=650; "title=" clip_image070 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image070" src= "http://s3.51cto.com/wyfs02/M00/6F/06/wKiom1WPlFiBWoAfAAD26JlE4rM583.jpg" height= "368"/>
Selected directory path
650) this.width=650; "title=" clip_image072 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image072" src= "http://s3.51cto.com/wyfs02/M01/6F/06/wKiom1WPlFjjdUKcAAEOMG5Dtxs024.jpg" height= "366"/>
Add complete
650) this.width=650; "title=" clip_image074 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image074" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlhjQ1I9jAADd6U1nlb0564.jpg" height= "351"/>
Click the--à drop-down menu in the upper-right corner-àedit configuration
650) this.width=650; "title=" clip_image076 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image076" src= "http://s3.51cto.com/wyfs02/M00/6F/02/wKioL1WPlhiR4CbSAACxE4T0sVA040.jpg" height= "206"/>
Click Add to the Left
650) this.width=650; "title=" clip_image078 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image078" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlhiReRwnAACnv9tOkFI617.jpg" height= "343"/>
Choose Tomcat Server-àlocal
650) this.width=650; "title=" clip_image080 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image080" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlhjjLljlAADbT9J2wcA271.jpg" height= "352"/>
Define Name
650) this.width=650; "title=" clip_image082 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image082" src= "http://s3.51cto.com/wyfs02/M02/6F/06/wKiom1WPlFnT64DiAAERvx3wEbY522.jpg" height= "344"/>
We also check Tomcat-related logs to find the problem
650) this.width=650; "title=" clip_image084 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image084" src= "http://s3.51cto.com/wyfs02/M00/6F/06/wKiom1WPlFmhAwTVAAD6EITHnww798.jpg" height= "349"/>
Add complete
650) this.width=650; "title=" clip_image086 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image086" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlhnCDJ3ZAACntYlaiJU630.jpg" height= "260"/>
We found that the page could not be displayed through Tomcat access
650) this.width=650; "title=" clip_image088 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image088" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlhmCEPJVAADfEImLjDg877.jpg" height= "315"/>
---Edit configuration through the upper right corner
650) this.width=650; "title=" clip_image090 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image090" src= "http://s3.51cto.com/wyfs02/M00/6F/02/wKioL1WPlhmgFdTsAADwsorZ8qE708.jpg" height= "317"/>
Click Fix to check the fix
650) this.width=650; "title=" clip_image092 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image092" src= "http://s3.51cto.com/wyfs02/M01/6F/02/wKioL1WPlhnSqGnrAAETHST3EL8709.jpg" height= "338"/>
After the Fix check fix is complete, click OK
650) this.width=650; "title=" clip_image094 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image094" src= "http://s3.51cto.com/wyfs02/M02/6F/02/wKioL1WPlhmRfvAOAADnl-VfNbg318.jpg" height= "343"/>
Run again with Tomcat, prompt for updates, and then we'll run it again manually select Restart Server to
650) this.width=650; "title=" clip_image096 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image096" src= "http://s3.51cto.com/wyfs02/M00/6F/02/wKioL1WPlhnQ6mw7AAEkfb4wbpA175.jpg" height= "363"/>
Access complete
650) this.width=650; "title=" clip_image098 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image098 "src=" http://s3.51cto.com/wyfs02/M00/6F/06/wKiom1WPlFqibwe5AADzks9u5kE221.jpg "height=" 305 "/>
The registration machine is included with the attachment, please modify the extension from txt to. 7z after decompression
This article from "Gao Wenrong" blog, reproduced please contact the author!
Introduction to the detailed installation configuration of idea, Eclipse and the Tomcat service integration