部署 GWT 和 HTML 应用程序

发布于 2024-12-19 15:08:40 字数 316 浏览 2 评论 0原文

我有一个简单的网站,仅使用四个 HTML 页面。一页有一个

元素。在 GWT 应用程序中,我使用 RootPanel.get("main_container") 来访问该元素。 GWT 应用程序使用 GWT-RPC 连接到服务器(用 java 编写)。我的问题是如何在 xampp 上测试它,因为如果我编译 GWT 应用程序并上传 war 文件并将四个 HTML 文件放入其中,那么我可以访问除包含 < 的页面之外的所有页面。 div> 元素。我这里需要一些帮助!

I have a simple site, that uses just four HTML pages. One page has a <div id=main_container /> element. From the GWT application I use the RootPanel.get("main_container") to access that element. The GWT app uses GWT-RPC to connect to a server (written in java). My problem is how to test it on xampp, because if I compile the GWT app and upload the war files and put inside it the four HTML files, then I can access all of the pages except the one that contains the <div> element. I need some help here!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧时浪漫 2024-12-26 15:08:40

如果您使用 GWT-RPC,您还需要一个应用程序服务器,例如 jetty 或 tomcat。仅有阿帕奇是不够的。
如果您正在开发应用程序,则不需要 apache,因为您可以在 DevMode 或仅 jetty 中运行整个 Web 应用程序。

在生产中,您要做的是将 Apache 设置为在 jetty 上运行的 Web 应用程序的代理。需要明确的是,您无法在大多数共享主机环境上运行也使用 GWT-RPC 的 GWT 应用程序。

If you are using GWT-RPC, you also need an Application Server like jetty or tomcat. Apache alone is not enough.
If you are developing your app, there is no need for apache as you can run your whole web app in DevMode or just jetty.

In production what you want to do is set up Apache as a proxy to your web app running on jetty. Just to be clear, you cannot run a GWT app that also uses GWT-RPC on most shared host environments.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文