Configuration of the Eclipse Tomcat plug-in, and Tomcat configuration

Source: Internet
Author: User

First download the version of the Tomcat plugin corresponding to the Eclipse version, (note here: Tomcat plugin is tomcat plugin, Tomcat is Tomcat, the two cannot be confused!). )

: http://www.eclipsetotale.com/tomcatPlugin.html

Then unzip the resulting compressed package and put it into Eclipse's plugins directory to restart Eclipse, and the Tomcat plugin was successfully installed!

Of course the installation is not successful and representative of the use, here also to configure Tomcat, in order to normal use of Tomcat plug-ins,

Configuration process:

First download the Tomcat version currently available for Eclipse,

: http://tomcat.apache.org/

Then extract to the specified directory and configure

Eclipse-toolsbar, Windows---prefences, Tomcat, pointing to the directory just Tomcat unzipped,

With this configuration complete, Tomcat can be started and turned off using the Tomcat plugin.

Use Eclipse to build Dynamic Web Project such as: Helloproject

Right-click Run as–> run on Server

Popup Interface Configuration:

Configuration is complete, you will see a Servers directory under such an effect project directory, is the TOMCAT configuration of the exclusive Helloproject project,

And you'll see Servers in the console block.

Now you can use Tomcat, Start, Stop, Restart, and so on.

The main point to be said, but also the following is to say:

For Server.xml and Tomcat/conf/server.xml files in the red circle,

We said the server.xml in the red circle is a configuration file generated for Helloproject, and of course multiple projects can share a configuration under a Servers directory! Let's not talk about this for the moment.

And Tomcat/conf/server.xml is Tomcat itself, with greater versatility.

In order to make it easy to distinguish us from the red circle Server.xml called Project.server.xml, Tomcat/conf/server.xml called Tomcat.server.xml.

The main talk of Server.xml in the <context .../>

See Project.server.xml in <context docbase= "Helloproject" path= "/helloproject" reloadable= "true" source= " Org.eclipse.jst.jee.server:HelloProject "/>

DocBase refers to the Helloproject directory that is relative to the Servers directory, which is the project directory.

Path refers to the site access path, such as: Http://locahost:8080/HelloProject

We don't usually move this project.server.xml like this.

And for tomcat.server.xml in <content .../> complement map "

"Fill Map

We see both of these configurations are right:

<!--<context path= "/hp" reloadable= "true" docbase= "C:\Documents and Settings\administrator\workspace\ Helloproject\webcontent "workdir=" D:\worDir "/>--
<context path= "/helloproject" reloadable= "true" docbase= "C:\Documents and Settings\administrator\workspace\ Helloproject "workdir=" C:\workDir "/>

<context path= "/hpt" reloadable= "true" docbase= "C:\Documents and Settings\administrator\workspace\helloproject" Workdir= "C:\workDir"/>

Site access paths are

Http://localhost:8080/HP

Http://localhost:8080/HelloProject

For the top HPT we can access this:

Http://localhost:8080/HPT/WebContent

This way, you can see that if docBase refers to webcontent, it is possible to define a path by itself.

If docBase refers to a project directory, it must use the original path of the project, or the path access is modified

The final workdir is the directory that the JSP publishes after deployment, which can be arbitrarily assigned or not specified.

Configuration of the Eclipse Tomcat plug-in, and Tomcat configuration

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.