After the jetty is configured, it is much more fun to develop. The specific configuration is as follows:
First, configure the Pom.xml file, add the following : <plugin>
<groupId>Org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
</plugin>
Second, add an external tool (reprint please indicate Blog.csdn.net/whuslei)
iii. Configuring MAVEN Paths and jetty execution commands
Four, then you will see the following options on the toolbar
If you do not see this, add it yourself:
Five, start jetty
If success occurs: Listening for transport dt_socket in address: * * *
------- If you want to debug, what to do. Then configure:--------------------------------------------
First, modify the contents of the Environment
New A variable, named Maven_opts, with a value of
-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,address=4000, Server=y,suspend=n
Second, configure remote debug
In the pop-up dialog box, select
Set the parameters, note that the port here must be consistent with the previous setting
third, start remote debugging
Start the jetty listener first, the command line prompts the prompt window
four, remote boot jetty
So that you can debug, how to close it?
Five, set close jetty shortcut, modify Pom.xml document
<plugin>
<groupId>Org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<stopPort>9966</stopPort><!--Stop Jetty-->
<stopKey>foo</stopKey>
</configuration>
</plugin>
Six, a new jetty Stop command, very simple
Seven, stop debugging
" Skill "
1, the first to start the jetty listening port in order to start jetty remote debugging.
2. If jetty stop execution fails, the following exception occurs when the listening port is started again:
FATAL ERROR in native method:jdwp No transports initialized, Jvmtierror=agent_error_transport_init (197)
Error:transport error 202:bind failed:address already in use
ERROR:JDWP Transport Dt_socket failed to initialize, Transport_init (510)
JDWP Exit Error Agent_error_transport_init (197): No transports initialized [... /.. /.. /SRC/SHARE/BACK/DEBUGINIT.C:690]
This is because the listener has not stopped and is still bound to the port. So you just need to find this program.
Only need to find Java.exe (if you don't have other Java processes) Oh. ), to end this off.