However, as the GWT uses RPC, I will not have managedbeans, right?
没错,GWT RPC 使用 POJO。
So, GWT automatically handles user session for me, or do I have to do it myself?
GWT 是纯 AJAX APP - 客户端代码(通常)在一个浏览器窗口中运行(类似于 gmail)并且不会重新加载网页。这意味着应用程序状态始终存在 - 不需要会话(作为保存状态的一种手段)。您可能仍然需要会话来进行用户身份验证,但这通常由 servlet 容器处理。
What is the best package structure for the project?
三个包:client、server 和 shared。 Client 用于 GWT 客户端代码,server 用于服务器(也是 RPC)代码,shared 用于客户端和服务器都使用的 POJO。
It is best to use RPC, or create a webservice and access the webservice in GWT?
使用 GWT-RPC 或(更好,更新)使用 RequestFactory。
It's hard to host the application on a tomcat server?
这很简单:GWT 客户端代码被编译为 JS/html 并作为任何静态内容托管。 RPC 服务器代码只是 Servlets - 正常的 web.xml 注册。
Is there a test saying which server is faster for GWT?
没有线索,但恕我直言,这并不重要,因为大部分延迟将来自数据库和网络。