Some of the problems I encountered in using the Tomcat plugin in eclipse

Source: Internet
Author: User


first, talk about how to use the Tomcat plugin in Eclipse. After installing the Tomcat plugin, start Eclipse. If you have successfully installed the Tomcat plugin, open window->preferences. Click Tomcat in the pop-up window to make a tomcat correlation:I'm using tomcat5  the version of the plugin matches the version of Eclipse. When developing, be sure to note whether the version of Eclipse and the corresponding plug-in version are supported. Failure to do so causes an unexpected failure to start. I was in the development of a Eclipse3.1 to make the TOMCAT3 plug-in, there are many unexpected reasons, but also can not find the reason. The final replacement is for Tomcat3.1 problem solving. The visible plugin version is supported by Eclipse 10 important.                                                                                                                         1.tomcat Version (select the appropriate Tomcat version)2.tomcat Home (select the path of Tomcat installed locally via browse)3.Context Declaration Mode (Select the type of the Context declaration, 1. If you select Server.xml, after you create a new Tomcat project, The context property is automatically added to the Server.xml file. 2. If you select context files, a new XML file is created, with only the context attribute in it, and the file is automatically named by the project name .  1.server.xml       Add the context attribute to the%tomcathome%\conf\ Server.xml file  
  2.Context files    Create an XML file with the project name, Project.xml placed in%tomcathome%\conf\\ Catalina\localhost Directory of files only
                      context properties. Here are some of the problems I have encountered in development:1.Tomcat default port is 8080[Url]http://localhost:8080/index.jsp[/url]
  reason: Tomcat will not start normally
  solution: 1. Close applications that occupy 8080 ports  
            2. Change the HTTP connection port of the Tomcat server (% Tomcat_home%/conf/server.xml)
              <Connector   port= "8080"   .../> .2.tomcat automatically shuts down after startup.
  Reason: Open another tomcat
  Solution: Close another started Tomcat 3. Deploying Web Apps
1. Copy the war file or Web application folder to the%tomcat_home%/server/webapps/directory
2. Create an XML file that contains only the context content for the Web service in the%tomcat_home%/server/webapps/directory, where the Web app can be placed anywhere on the hard drive
4.Tomcat restricting specific host access
<context path= "..." >
<value classname= "Org,apach.catalina.valves.remoteaddrvalve"
allow= "127.0.0.1"
Deny= ""/>
</Context>a new Tomcat project in 5.Eclipse will automatically be based on the properties of Tomcat that you configure in Eclipse1, add <context > Attribute% in%tomcat_home%/conf/server.xmlorCreate a new XML file with the project name in the 2.tomcat_home%/conf/catalina/localhost directory with only the <Context> attribute. If you delete a project in Eclipse and start Tomcat again, there are sometimes errors saying that the project file could not be found. The reason may be that although the project has been removed, it may not be deleted in the Tomcat configuration file. For example: tomcat_home%/conf/ The files in the Catalina/localhost directory have not been deleted.

Some of the problems I encountered in using the Tomcat plugin in eclipse

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.