How to use Tomcat 8 in Eclipse?

后端 未结 11 851
广开言路
广开言路 2020-11-29 01:02

EDIT 2014-02-07: Eclipse Luna is here, and support for Tomcat 8 is included in the bundled WTP : ) Happy days!

Tomcat 8 is still in development, but

相关标签:
11条回答
  • 2020-11-29 01:30

    The only thing the eclipse plugin is checking is the tomcat version inside:

    catalina.jar!/org/apache/catalina/util/ServerInfo.properties
    

    I replaced the properties file with the one in tomcat7 and that fixed the issue for eclipse

    In order to be able to deploy the spring-websockets sample app you need to edit the following file in eclipse:

    .settings/org.eclipse.wst.common.project.facet.core.xml
    

    And change the web version to 2.5

    <installed facet="jst.web" version="2.5"/>
    
    0 讨论(0)
  • 2020-11-29 01:32

    I follow Jason's step, but not works.

    And then I find the WTP Update site http://download.eclipse.org/webtools/updates/.

    Help -> Install new software -> Add > WTP:http://download.eclipse.org/webtools/updates/ -> OK

    Then Help -> Check for update, just works, I don't know whether Jason's affect this .

    0 讨论(0)
  • 2020-11-29 01:32

    If you have untarred your own version of tomcat v8 with a root user into a custom directory (linux) then the default permissions on the TOMCATROOT/lib directory do not allow normal user access.

    Eclipse will not be able to see the catalina.jar to check the version. So no amount of fiddling aorund with the server.properties will help!

    just add chmod u+x lib/ to allow normal user access to the libs.

    0 讨论(0)
  • 2020-11-29 01:34

    Downloaded Eclipse Luna and installed WTP using http://download.eclipse.org/webtools/repository/luna

    Downloaded Tomcat 8 and configured new server in Eclipse. I am able to setup tomcat 8 now in Eclipse luna

    0 讨论(0)
  • 2020-11-29 01:35

    UPDATE: Eclipse Mars EE and later have native support for Tomcat8. Use this only if you have an earlier version of eclipse.


    The latest version of Eclipse still does not support Tomcat 8, but you can add the new version of WTP and Tomcat 8 support will be added natively. To do this:

    • Download the latest version of Eclipse for Java EE
    • Go to the WTP downloads page, select the latest version (currently 3.6), and download the zip (under Traditional Zip Files...Web App Developers). Here's the current link.
    • Copy the all of the files in features and plugins directories of the downloaded WTP into the corresponding Eclipse directories in your Eclipse folder (overwriting the existing files).

    Start Eclipse and you should have a Tomcat 8 option available when you go to deploy. enter image description here

    0 讨论(0)
  • 2020-11-29 01:48

    This should be a comment under the accepted answer, but I don't have 50 reputation yet.

    At http://download.eclipse.org/webtools/downloads/

    I first selected Released 3.5.2, which like others did not work for me. Then I picked Integration 3.6.0, and saw Tomcat 8 for New Project of Dynamic Web Project.

    0 讨论(0)
提交回复
热议问题