In the IJ-raised remote jetty and Tomcat

Source: Internet
Author: User

The development of the application in the local run well, but deployed to the server, application services can be started up, the operation is always a problem. For this scenario, the remote mode is more useful. The specific use is as follows: I. Using IJ to open a project

(formerly I called Idea, since the new logo is IJ, I also call it), click on the upper right corner of the edit configurations.
two. Create a new remote Debug configuration

1. Point to the upper left corner of the plus, and then select Remote, and then name Random.
2. Fill in the IP of the application server and an unused port (this port is not the application server's port),
3. Select the source code class path.
4. Copy the Java run parameters to start the servlet application server.
5. Of course, click OK button to complete configuration three. Package the current application and deploy it to the application server. four. Use the parameters just copied to start the application server.

1.jetty procedure. Using D:\jdk8\bin\java "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8081"-jar Start.jar can achieve effect to start jetty
2.tomcat procedure: Tomcat-8\bin\catalina.bat, add set java_opts= "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n, address=8081 "Then point start.bat boot can achieve effect to start Tomcat five. Back to IJ, click the Debug button in the upper-right corner. Place breakpoints where needed . Six. Open the request in the browser (this is, of course, a request to the remote server).

This approach does not apply only to a particular application server, WebLogic also applies, and Java applications should apply. The core is to start the application server with the above parameters. The code for the remote application server should be the same as the local code, No, I don't know what's going on. For greater assurance, the local full pack (not incrementally packaged) remote server can use code management such as SVN or git as well as local. Then use MAVEN or Gradle to compile the package.

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.