One: Research and development tools ( recommended )
Eclipse:eclipse-jee-kepler-sr2-win32-x86_64.zip ( comes with maven)
tomcat:apache-tomcat-7.0.53
mysql:5.0
in the Introduction to Project ( The process may be a bit slow because the need to download the project requires the jar The download directory for the file is
II: Eclipse Remote Debug Debug
1, edit Tomcat\bin\catalina.bat, in
REM Guess catalina_home if not defined
Set "current_dir=?%"
Before you add the following code to bind a port 8787:
If ""%1 "" = = "" Stop "goto skip_config
SET Catalina_opts=-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8787
: Skip_config
address refers to the binding of starting Port 8787.
2, configure in Eclipse:
Right-click Project->debug as->debug Configurations
Locate the Remote Java application in the pop-up settings box with your own project, set port to 8787, and then apply->close:
OK, Setup is complete. The first thing to do is to run Start.bat to start Tomcat, but this is just a generic boot, not yet in debug mode. To Debug, you should right-click on the project->debug as->debug configurations->remote Java application->passing (own project name)->debug. After that, we can break the point of Debug.
3: setting.xml copied to c:\users\administrator\.m2 Directory below
<servers>
<server>
<id>tomcat</id>
<username>admin</username>
<password>[email protected]#</password>
</server>
</servers>
Three: Tomcat:redeploy Hot deployment
Edit the Pom.xml of the project and add the following content
<plugin>
<groupid>org.codehaus.mojo</groupid>
<artifactid>tomcat-maven-plugin</artifactid>
<version>1.1</version>
<configuration>
<server>tomcat</server>
Span style= "White-space:pre" > <username>admin</username>
<password>[email protected]#</password>
< Url>http://127.0.0.1:8080/manager/text</url>
<path>/ Bright</path>
</configuration>
</plugin>
(1) Catalina.bat to start Tomcat
(2) Right-click on the project or Pom.xml, then run As-maven build-
Maven+tomcat+eclipse Hot Deployment