Using jetty to develop and debug MAVEN Web project in Eclipse __web

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.