在开发环境中,在tomcat中重新加载webapp的简单快捷的方法是什么? [英] What's an easy, quick way to reload a webapp in tomcat in dev environment?

查看:470
本文介绍了在开发环境中,在tomcat中重新加载webapp的简单快捷的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上运行Tomcat 6。我有Monitor Tomcat系统托盘图标,它允许我启动和关闭Tomcat,但还有另一个小工具,可以让我在更改类文件时轻松重新加载我的Web应用程序吗?我知道Tomcat附带的经理应用程序有一个重新部署选项,但只是想知道是否有一个本机应用程序可以更快更好地执行此操作?

I'm running Tomcat 6 on Windows. I've got the "Monitor Tomcat" system tray icon which allows me to start and shutdown Tomcat, but is there another little tool that allows me to easily reload my web app when I've changed the class files? I know the "manager" app that comes with Tomcat has a redeploy option, but just wondering if there's a native app that would do this a bit quicker and nicer?

推荐答案

只需将 reloadable = true 属性添加到上下文。引用文档

Just add a reloadable=true attribute to the Context. Quoting the documentation:


如果您希望Catalina监控 / WEB-INF / classes /中的类,请设置为 true / WEB-INF / lib 进行更改,并在检测到更改时自动重新加载Web应用程序。此功能在应用程序开发期间非常有用,但它需要大量的运行时开销,不建议在已部署的生产应用程序上使用。这就是为什么这个属性的默认设置是 false 。但是,您可以使用 Manager Web应用程序来触发重新加载按需部署的应用程序。

Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.

这篇关于在开发环境中,在tomcat中重新加载webapp的简单快捷的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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