简体   繁体   English

生产模式下的gwt服务器在哪里?

[英]Where is the gwt server in production mode?

I am learning GWT with the guide here, http://www.gwtproject.org/gettingstarted.html 我正在此处的指南http://www.gwtproject.org/gettingstarted.html中学习GWT

I execute: 我执行:

ant build

and see all files generated in the war/ folder. 并查看war /文件夹中生成的所有文件。

However, that's all static and frontend things. 但是,这都是静态的和前端的事情。

I open the generated HTML file only to find that the ajax requests failed because there is no server serving that. 我打开生成的HTML文件只是为了发现ajax请求失败,因为没有服务器提供该服务。

I tried putting the war/ folder in tomcat's path, and open the HTML through tomcat server, it doesn't work, either. 我尝试将war /文件夹放在tomcat的路径中,并通过tomcat服务器打开HTML,但它也不起作用。

So where is the server side program generated by gwt and how to use them? 那么gwt生成的服务器端程序在哪里,以及如何使用它们呢?

In production mode, only JavaScript and associated files are generated - you can use any server you want. 在生产模式下,仅生成JavaScript和关联文件-您可以使用所需的任何服务器。 For production, you almost certainly want more control over the server than what DevMode would provide with its built-in server (in fact, I would suggest that most teams shouldn't use the built-in server in dev mode either, except for the simplest of "Hello World" apps). 对于生产而言,几乎可以肯定,您需要对服务器的控制要比DevMode对其内置服务器提供的控制更多(事实上,我建议大多数团队也不应该在dev模式下使用内置服务器,除了最简单的“ Hello World”应用)。

For something simple to get going and very similar to what DevMode can provide by default, check out Jetty or Tomcat, but there are many other great options as well, depending on what features you'd like to have. 要使开发变得简单并且与DevMode可以默认提供的功能非常相似,请查看Jetty或Tomcat,但是根据您想要的功能,还有很多其他不错的选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM