Maven Learn about the five Eclipse Tomcat common settings

Source: Internet
Author: User
Tags tomcat server apache tomcat

Eclipse under Tomcat common settings 1,eclipse build Tomcat service 1.1 new server

First of all, here is the JEE version of Eclipse. Eclipse is not integrated with Tomcat like MyEclipse and requires our own setup.

New, other Server, then select the version of Tomcat under Apache.

Note: If the next or Finish button is grayed out, you will need to set it up in Runtime environments, windw-> Preferences, Server. Need to add love to a Tomcat runtime environment. Specify the path and JRE for Tomcat.

1.2 Setting up the Tomcat Server

Then new server said, click Next, will let you add items, do not add, but also need to configure some places. Finish.

Open the Servers window with the tomcat we just built, and double-click it to open the configuration file.

Setting 1: In the server locations, select Use Tomcat installation. is to publish the file to the Tomcat installation directory when you publish the project. The default is in Eclipse's server project, where the path is particularly deep, so it is particularly troublesome to view files.

Setting 2:

The first option of the Server options serve modules without publishing

By default, when a project is deployed to Tomcat, the plug-in copies the project files to the Wtpwebapps directory of the display server path in the previous configuration item server locations , which is under the directory where the current wrokspace is located. Metadata subdirectory, such as my wrokspace is D:\workspace, then this directory is: D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0 \wtpwebapps. However, if you select this option above, the project file will not be published to this directory, but instead: the Web resource directory is the webcontent of the Web project, the Src/main/webapp directory of the MAVEN Web project, The class file directory is the output directory of the currently configured class file, which is the target/classes directory for the MAVEN project

Select Publish module contexts to separate XML files. If you do not select the general will error. Did not find a matching property. The main purpose of this step is to make the <context> element, which is originally configured in conf/server.xml, separate to the/conf/catalina/localhost/directory to generate a {context_name} . Xml.

Modules Auto Reload by default means auto self-loading

Enable security enables security for our applications

Setting 3:

Never publish automatically never perform an auto-publish operation

Automatically publish when the resources change is automatically released when a resource changes

Automatically publish after a build event is automatically published after a build incident (set at specific time in publishing interval (in seconds))

If the project is large, it may take a long time to start, but Tomcat sets the time-out, and we need to change the time-out to longer. Changes in timeouts.

Setting 4: The port number can be changed in ports.

1.3 Error: The Apache Tomcat Native Library which allows optimal performance in production environments is not found on the JA Va.library.path:

Actually it is recommended to use Apache Apr. If you want to use APR, the actual operation is very simple, download http://tomcat.heanet.ie/native/1.1.1/binaries/win32/tcnative-1.dll. Copy this file to C:\WINDOWS\system32\ and restart Tomcat.

2, add delete publish item

This is easy, first open the server window and right-click Tomcat.

Add and remove adds a delete item. Projects that are not dynamic web types will not be allowed to be added.

Publish publish the project.

Start starts Tomcat.

Find other issues and then add

Maven Learn about the five Eclipse Tomcat common settings

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.