如何使用Tomcat 8.5.x和TomEE 7.x与Eclipse? [英] How to use Tomcat 8.5.x and TomEE 7.x with Eclipse?

查看:426
本文介绍了如何使用Tomcat 8.5.x和TomEE 7.x与Eclipse?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Eclipse中设置Tomcat 8.5.x 服务器版本。当我尝试使用Eclipse GUI创建服务器时,我将Eclipse Luna作为最新版本Apache Tomcat v8.0 的选择。当我选择它,我浏览到我的Tomcat 8.5.x服务器,我得到这个阻止错误消息:

I need to setup a Tomcat 8.5.x server version in Eclipse. When I try to create a server using Eclipse GUI, I get in Eclipse Luna as choice the latest version "Apache Tomcat v8.0". When I select it and I browse to my Tomcat 8.5.x server, I get this blocking error message:


在这个Apache Tomcat安装目录是8.5.0版本。 A
预期Tomcat 8.0安装。

The Apache Tomcat installation at this directory is version 8.5.0. A Tomcat 8.0 installation is expected.

当尝试TomEE 7.x时,内部出现相同的错误Tomcat 8.5。

The same error appears when trying TomEE 7.x, which is internally based on Tomcat 8.5.

在Eclipse Neon 中,最新版本作为Apache Tomcat v9.0 ,它给出相同的错误。甚至没有一个 Apache Tomcat v8.5 选项。

In Eclipse Neon the latest version as choice is "Apache Tomcat v9.0" and it gives the same error. There isn't even a "Apache Tomcat v8.5" option.

有没有办法使用Tomcat? strong>和TomEE 7.x在Eclipse中?如何?

Is there a way to use Tomcat 8.5 and TomEE 7.x in Eclipse? How?

推荐答案

你必须修补 catalina.jar 是WTP适配器查看的版本号。这是一个非常无用的检查,适配器应该允许你启动服务器,但没有人还没有。

You have to patch catalina.jar, as this is version number the WTP adapter looks at. It's a quite useless check, and the adapter should allow you to start the server anyway, but nobody has though of that yet.

多年来,与每一个版本的Tomcat一起都是一个问题。

For years and with every version of Tomcat this is always a problem.

要修补,您可以执行以下操作:

To patch you can do the following:


  • cd [tomcat or tomee home] / lib

  • mkdir catalina

  • cd catalina /

  • unzip ../catalina.jar

  • vim org / apache / catalina / util / ServerInfo.properties

  • cd [tomcat or tomee home]/lib
  • mkdir catalina
  • cd catalina/
  • unzip ../catalina.jar
  • vim org/apache/catalina/util/ServerInfo.properties

确保它看起来像以下(版本号都需要从8.0开始):

Make sure it looks like the following (the version numbers all need to start with 8.0):

server.info=Apache Tomcat/8.0.0
server.number=8.0.0
server.built=May 11 2016 21:49:07 UTC

然后:


  • jar uf ../catalina.jar org / apache / catalina / util / ServerInfo.properties

  • cd ..

  • rm -rf catalina

  • jar uf ../catalina.jar org/apache/catalina/util/ServerInfo.properties
  • cd ..
  • rm -rf catalina

这篇关于如何使用Tomcat 8.5.x和TomEE 7.x与Eclipse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆