Eclipse Hot Deployment Project in Tomcat

Source: Internet
Author: User
Tags tomcat server

Eclipse in Tomcat in Hot Deployment Engineering

1. Install a Tomcat plugin in Eclipse China: sysdeoeclipse Tomcat Launcher plugin (http://www.eclipsetotale.com/tomcatPlugin.html )

2. Create a new Web project, such as: Hello

3. Configure the Tomcat server. Open menu window-"preferences-" Tomcat


There are two options for context declaration mode, which is to specify whether the configuration of the application (Context) is placed in server.xml or in a separate folder. This is used when the interface is configured.

Click "OK" to complete the configuration.

4. Open the Contexts directory directories above, that is: Tomcat\conf\catalina\localhost. To build an XML file in the directory, write the content:

<? XML version= ' 1.0 ' encoding= ' utf-8 ' ? ><! - It doesn't matter if it's written or not-- >

< Context Path = "/hello" DocBase = "E:\workspace\hello\WebRoot" reloadable = "true"/>

can also be added under \conf\server.xml <Host><Host/> node

< Host >

< Context Path = "/hello" DocBase = "E:\workspace\hello\WebRoot" reloadable = "true"/>

< Host />

Attached: the context element in Tomcat is detailed

There is also an easy way to configure through the interface. Right-click Project-"Select Properties"


After the configuration is complete. You can see that a hello.xml file was generated in the Tomcat\conf\catalina\localhost directory. (The two configurations of context Declarationmode in the first diagram are to configure where this file is placed)

5. Click the kitten icon to start Tomcat.

The above approach achieves the basic thermal deployment, and the development efficiency improves a lot. However, when you append a method or class variable, you are prompted to restart.

Other hot deployment plug-ins are also available. Jrebel plugin. The Jrebel is chargeable.

In addition, MyEclipse has been integrated with similar functions, or very useful. Just feel myeclipse too big and bloated.


Tomcat often reports the following error when it launches in a Web project

: java.lang.ClassNotFoundException: Org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader

That's because the jar file is missing Spring-tomcat-weaver.jar, which needs to be placed in Tomcat's Lib directory.


Eclipse Hot Deployment Project in Tomcat

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.