servlet(tomcat)中没有反映最新的更改 [英] Latest changes are not reflected in servlet (tomcat)

查看:114
本文介绍了servlet(tomcat)中没有反映最新的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正处理我的安静项目现在我正在使用tomcat和eclipse正常工作到现在为止..

I am working on my project of quiet sometime now I am using tomcat and eclipse both working correctly till now..

我在22-1上部署了战争2012(带有一些打印消息)它工作正常然后第二天我做了一些更改删除了一些消息并重新部署了文件...在我的webapps文件夹中它显示了我的war文件的最后修改的最新时间..什么我正在告诉我错误..

I deployed the war on 22-1-2012 ( with some print messages) it was working correctly then next day I made some changes removed some messages and redeployed the file...In my webapps folder it is showing the latest time for 'last modified' of my war file.. what wrong i am doing tell me..

PS反映了对同一项目的JSP页面的任何更改,但servlet类没有改变

P.S any changes to JSP pages of same project are reflected but servlet class is unchanged

这是日志文件显示
_SEVERE:Web应用程序似乎已经通过java.util.Timer API启动了一个名为[MySQL语句取消计时器]的TimerThread,但未能阻止它。为防止内存泄漏,计时器(以及相关联的线程)已被强制取消。 _

This is what log file shows _SEVERE: A web application appears to have started a TimerThread named [MySQL Statement Cancellation Timer] via the java.util.Timer API but has failed to stop it. To prevent a memory leak, the timer (and hence the associated thread) has been forcibly cancelled. _

这是我的问题摘要我希望我现在可以解释你的问题
i再次执行以下步骤

1.从webapps删除我的webapp目录

2.Tried访问servlet(显示'资源不可用')
3.在打印语句中进行一些更改以进行调试
4从eclipse重新部署WAR 5.再次访问servlet它不是最新版本它显示相同的旧消息。

现在告诉我是否有解决方案....
提前谢谢

Well this is the summary of my problem i hope i can explain you now the problem i again performed the following steps
1.Deleted my webapp directory from webapps
2.Tried to access servlet (it shows 'Resource not available')
3.Make some changes in print statement to debug
4.Redeployed WAR from eclipse
5.Again when access that servlet it is not the latest version it is showing same old messages.

Now tell me if there is solution.... Thanks in advance

尝试了很多事情后我才观察到我在部署WAR文件时发现的非JSP servlet类当我在WAR中手动添加这些类文件所有更改都更新时,WAR中没有包含文件。所以现在可以告诉我如何在WAR中自动部署这些文件。问题是什么?

After trying so many thing i just observed when i deploy the WAR file non-JSP servlet class files were not included in WAR when I manually add these class files in WAR all the changes are updated.. So now can u tell me how to auto deploy these in WAR..whats the problem?

推荐答案

JSP文件没有更新,因为它们是预编译的,即使它们可能从已更改的文件中提取信息,可能受影响的JSP文件需要对其进行微小更改,例如添加空格然后删除空格,然后保存它。

The JSP files are not updating because they were precompiled, and even though they may pull information from files that have changed, each JSP file that may be affected needs to have a minor change made to it, like add a space and then remove a space, and then save it.

然后构建WAR ,然后更新应该显示。今晚我遇到了同样的问题,其他答案都没有帮助。关键是,检查部署WAR的Tomcat目录中的文件日期。我注意到即使我正在部署一个全新的已清理的WAR,并删除所有文件夹,仍然有较旧的缓存文件,可能是因为Eclipse保留它们以节省编译时间,认为它们没有任何更改。

Then build your WAR, and then the updates should show. I went through this same problem tonight and none of the other answers helped. The key is, to check the file dates in the Tomcat directory of where you deployed the WAR. I noticed that even though I was deploying an entirely new cleaned WAR, and deleting all folders, there were still older cached files in there, probably because Eclipse keeps them to save compile time, thinking they don't have any changes.

希望这有助于

这篇关于servlet(tomcat)中没有反映最新的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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