在战争部署中未反映的Java资源文件中所做的更改
我有一个Web应用程序,并且我正在尝试修复代码中的错误,但是无论我在部署战争文件时我在Java资源文件夹中的.java文件中做什么,都不会反映更改。
我已经评论了事件处理程序,更改了按钮中的文本和书面打印语句,但是无论我在JBOSS服务器上部署战争文件时所做的更改如何,都无法反映。我对.java文件的更改正在进入战争文件中,我在战争中打开了编译的.class文件,它反映了我在代码中所做的更改。但是,一旦部署了Web应用程序,就不会反映.class文件中存在的更改。
旁注:如果我修改了JSP文件,这些更改确实会在战争中反映出来,因此我不确定它在哪里出错。该应用程序使用GWT,因此我不确定是否有一些问题或设置可以使我的代码使用先前缓存的JS文件。如果您需要更多信息,请告诉我,我会尽力提供的。
我当前的部署过程:
- 我运行一个Maven Clean/Maven构建以创建战争文件,
- 我将战争文件复制到目标目录中,然后将其粘贴到我的JBOSS服务器部署文件夹中,
- 立即识别文件,并开始部署
- 同一应用程序 应用程序不管发生什么变化
,我都可以肯定的是,问题与GWT有关,因为JS是唯一不改变的东西
=============================== ==================
更新
==============================
我设法将我的Java文件编译到GWT JS文件中,并将其添加到我的战争文件中。但是,我的应用程序仍在显示我已修改的按钮的旧名称。对于现在可能的问题,我感到不知所措。
I have a web application, and I'm trying to fix a bug in the code but no matter what I do in the .java files within my java resource folder when I deploy my war file the changes aren't reflected.
I've commented out event handlers, changed the text within buttons, and written print statements but regardless of the changes I make when I deploy my WAR file on the Jboss server it doesn't reflect. The changes I make to the .java files are going into the WAR file I've opened up the compiled .class file within the war and it reflects the changes I've made in my code. However once the web app is deployed the changes that are present in the .class files aren't reflected.
Side note If I modify the JSP files those changes do get reflected in the WAR, so I'm not sure where it's going wrong. The app uses GWT so I'm not sure if there's some issue or setting that makes my code used a previously cached JS files. If you need any more information please let me know and I'll try my best to provide.
My current deployment Process:
- I run a maven clean/maven build to create my WAR file
- I copy the WAR file within target directory and paste it into my Jboss server deployments folder
- Jboss instantly recognizes a file is there and starts to deploy application
- Same web application regardless of the change
I'm fairly certain the issue has to do with GWT because that the JS is the only thing that doesn't change
================================
UPDATE
=================================
I've managed to compile my java files into GWT JS files and added that to my WAR file. However my application is still showing the old names for buttons that I've since modified. I'm at a loss as to what could be the issue now.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试删除TMP和数据/内容中的内容,然后重试。
Try to delete what is inside tmp and data/content and try again.