如何在Eclipse中使用Tomcat 8? [英] How to use Tomcat 8 in Eclipse?

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

问题描述

EDIT 2014-02-07:Eclipse Luna在这里,支持Tomcat 8包含在捆绑的WTP中:)快乐的日子!

Tomcat 8还在开发中,但您可以获得这里。现在Apache Apache主页上有一个RC版本。更新2/27/14:8现在发布,适用于WTP的适配器,并没有集成到eclipse捆绑包中。很快!

Tomcat 8 is still in development, but you can get it here. Now there is a RC version on the main Apache Tomcat page. Update 2/27/14: 8 is released now, and adapters built for WTP, just not integrated into eclipse bundles yet. Soon!

在Eclipse Kepler中,Tomcat 8的添加服务器列表中没有支持的适配器。Tomcat 7适配器不起作用,看起来有一个新的扩展,它可以在安装新扩展对话框中下载。

In Eclipse Kepler though, there is no supported adapter in the add server list for Tomcat 8. the Tomcat 7 adapter doesn't work, and it doesn't look like there's a new extension for it to download in the "Install new Extension" dialog.

我唯一的选择是让它(Tomcat 8)在Eclipse之外的本地运行并且可能会将一个远程调试器挂入其中,以便逐步执行代码?那么甚至可以为Eclipse Kepler + Tomcat 8工作吗? IntelliJ IDEA 12在30分钟的时间内无法做到这一点。

Is my only option to get it (Tomcat 8) running locally outside of Eclipse and maybe hook a remote debugger into it for stepping through code? Will that even work for Eclipse Kepler + Tomcat 8? IntelliJ IDEA 12 couldn't do it in the 30 minutes of time I put into that path.

如果你想知道为什么我试图这样做我正在玩Spring 4.0.0.M1和4.0.0.M2 WebSocket的东西。他们(根据Rossen Stoyanchev的Spring 4.0 博客文章和例子)使用在Tomcat 8中实现的JSR-356,在理论上将在某些时候回到Tomcat 7。

If you're wondering why I'm trying to do this at all, I'm playing around with Spring 4.0.0.M1 and 4.0.0.M2 WebSocket stuff. They (per Rossen Stoyanchev's Spring 4.0 blog post and examples) use JSR-356, which is implemented in Tomcat 8, theoretically to be back-ported at some point to Tomcat 7.

更广泛的问题的答案如何轻松获得Spring 4 WebSocket支持的开发环境?会很好,但是知道如何将不支持的Web服务器插入到Eclipse中也是很好的。

An answer to the broader question of "How can I easily get a development environment going for Spring 4 WebSocket support?" would be nice, but it would also still be nice to know how to plug in unsupported web servers to Eclipse.

干杯,
E

Cheers, E

**更新8/7/13 - Rossen Stoyanchev更新了Spring 4.0.0.M2博客,并添加了一些jpda智慧,并分享,是的,他正在使用远程调试:

**Update 8/7/13 - Rossen Stoyanchev updated the Spring 4.0.0.M2 blog and added some jpda wisdom and shared that yeah, he's using remote debugging:

这就是说,使用Eclipse中的Tomcat 8进行调试并不难。只需将bin / startup.sh中的最后一行更改为(注意添加jpda):

That said, it's not very hard to debug with Tomcat 8 inside Eclipse. Just change the last line in bin/startup.sh to be (note the addition of "jpda"):

 exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"

Eclipse内部创建一个远程调试配置本地主机端口80,启动Tomcat之后启动,您可以在源代码中插入断点。

Inside Eclipse create a remote debugging configuration for localhost port 80, launch it after starting Tomcat, and you can put breakpoints in the source code.

感谢Rossen!

**更新9/29/13 - Eclipse Kepler SR1刚到,但唉!没有WTP支持Tomcat 8. Tomcat 8最多为RC3。

**Update 9/29/13 - Eclipse Kepler SR1 just arrived, but alas! No WTP support for Tomcat 8. Tomcat 8 is up to RC3.

**更新12/5/13

**Updates 12/5/13


  • 博客url修复。

  • Tomcat 8到RC5。

  • 跟踪WTP修复在Eclipse中的错误以支持Tomcat 8 HERE

  • IntelliJ IDEA新版本13说现在支持Tomcat 8.还没有亲自尝试过。

  • Blog url fix.
  • Tomcat 8 up to RC5.
  • Bug to track WTP fix in Eclipse to support Tomcat 8 HERE.
  • IntelliJ IDEA new version 13 says it now supports Tomcat 8. Haven't tried yet personally.

推荐答案

更新:Eclipse Mars EE及更高版本对Tomcat8有本机支持。仅当您使用eclipse的早期版本时才能使用此功能。

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

最新版本的Eclipse仍然不支持Tomcat 8,但是可以添加新版本的WTP和Tomcat 8的支持将本地添加。要执行此操作:

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:


  • 下载最新版本的Eclipse Java EE

  • 转到 WTP下载页面,选择最新版本(目前为3.6),并下载zip(
    以下)传统的Zip文件... Web应用程序开发人员)。 这是当前链接

  • 将下载的WTP的功能和插件目录中的所有文件复制到相应的Eclipse目录中在您的Eclipse文件夹(覆盖现有文件)。

  • 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).

启动Eclipse,您应该有一个Tomcat 8选项可用于部署。

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

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

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