Gwt 托管模式服务器端重新加载
每当我在 GWT 客户端文件中进行代码更改时,我只需重新加载浏览器或按“重新加载网络服务器”,更改就会立即应用。但是,当我更新服务器端代码时,它不会像这样工作,这意味着我必须停止该模块并再次重新运行它,这可能需要一些时间。事情会这样发生吗?当我像客户端一样更新服务器端代码时,托管模式是否会立即更新?
谢谢
Whenever I made code changes in GWT client side files I can just reload the browser or press "reload webserver" and the changes will be applied instantly. However, it doesn't work like that when I update my server side codes which means I have to stop the module and re-run it again which can take sometime. Is it suppose to happen like that? Is there anyway for the hosted mode to update instantly when I update server side code like client side?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“重新加载网络服务器”按钮就是您要找的:它“重新加载”您的
war/WEB-INF
中的所有类(classes
和lib< /code>) 并基本上重新启动您的网络应用程序。
如果它对您不起作用,那么可能是因为您没有将类编译到
war/WEB-INF/classes
和/或将它们放在 DevMode 的类路径中(然后您应该看到DevMode 窗口中的警告指出代码不是从 web 应用程序加载的,而是从父类加载器加载的)。The "reload webserver" button is what you're looking for: it "reloads" all the classes from your
war/WEB-INF
(classes
andlib
) and basically restarts your webapp.If it doesn't work for you, then maybe it's because you don't compile your classes to your
war/WEB-INF/classes
and/or have them in the DevMode's classpath (you should then see warnings in the DevMode window saying the code wasn't loaded from the webapp but from the parent classloader).这是典型的服务器端代码。服务器代码在 Jetty 中运行,据我所知,它没有自动重新加载的选项,尽管 Tomcat 有,所以您可能会在外部服务器中运行它 - 有这样的选项。
一个提示 - 不要停止和启动,只需使用重新加载按钮(看起来像刷新)。它要快得多。
It is typical for server side code. Server code is run in Jetty and as far as I know it doesn't have option to reload automatically, though Tomcat has, so you could potentially run it in external server - there is such option.
One hint - don't stop and start, just use reload button (looks like refresh). It is much faster.