Eclipse + Tomcat - 直接从工作区提供webapp [英] Eclipse + Tomcat - Serve webapp directly from workspace

查看:156
本文介绍了Eclipse + Tomcat - 直接从工作区提供webapp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Tomcat配置为直接从我工作区内的项目目录中直接提供的理想方法是什么? (相关的

What is the ideal way to configure Tomcat to serve directly from my project's directory inside of my workspace? (related)

我想要我的静态网页资源可随时更改,而无需将其发布到单独的目录即时即时可用。好像最好的方法是直接提供文件,而不是文件的发布/部署副本。

I want my static web resources to be instantly available anytime I make a change to them without having to publish them out to a separate directory. It seems like the best way to accomplish this is to serve files directly rather than a published/deployed copy of the file.

或者,我开放给开发Java Web应用程序的其他选项(不同的应用程序服务器或IDE)更快。出版和重新部署每一个小小的变化都是吃太多的时间。

Alternatively, I'm open to other options (different application servers or IDEs) that make developing Java web applications much quicker. Publishing and redeploying every small change is eating too much time.

我已经尝试过JRebel和FileSync(并且它们都在一定程度上起作用),但是他们尝试并修补不应该存在的问题。

I've tried JRebel and FileSync (and they both work to a certain degree) but they try and patch a problem that shouldn't exist.

推荐答案

我从来没有真正喜欢与Eclipse捆绑在一起的WTP插件。

I've never really liked the WTP plugin that gets bundled with Eclipse.

过去,我在 Sysdeo Tomcat插件上取得了很大的成功对于Eclipse,

In the past I've had a lot of success with the Sysdeo Tomcat plugin for Eclipse.

它使用Eclipse为您构建的编译类,因此当您进行与界面兼容的更改(如更改方法中的某些内容)时,会得到立即部署而不需要重新启动。更改方法签名或在类中添加新方法确实需要重新启动,但由于没有漫长的WAR构建步骤,所以整个构建/部署周期都会减少。

It uses the compiled classes that Eclipse builds for you, so when you make an interface-compatible change (like changing some stuff inside a method), this gets deployed immediately without requiring a restart. Changing method signatures or adding new methods within a class do require a restart, but since there's no lengthy WAR-building step, the whole build/deploy cycle is reduced anyway.

此外,Sysdeo插件使用工作区中的静态资源,因此无需复制或部署这些资源。只需改变一下,刷新你的浏览器,你马上看到这个变化。

Additionally, the Sysdeo plugin uses the static assets from your workspace, so no need to copy or deploy these. Just make a change, refresh your browser, and you see the change right away.

不幸的是,几年前,这个插件的开发看起来就像一个停顿。根据他们网站上的矩阵,最新支持的Eclipse版本为3.6。根据此页

Unfortunately it looks like development of the plugin ground to a halt a couple of years ago. The latest supported version of Eclipse, according to the matrix on their website, is 3.6. According to this page however, the plugin still works with Eclipse 4.2 (Juno).

希望这有帮助。使用Sysdeo真的是比WTP更好的体验!

Hope this helps. Using Sysdeo is really a much nicer experience than WTP!

这篇关于Eclipse + Tomcat - 直接从工作区提供webapp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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