Google Web Toolkits如何与Servlet配合使用?

时间:2023-01-17 22:19:59

I'm considering building a web app using Java and Google Web Toolkit and I have some questions.

我正在考虑使用Java和Google Web Toolkit构建一个Web应用程序,我有一些问题。

I assume that when someone goes to a URL such as http://site.com/Signup, the Signup servlet will be loaded which will perform all the necessary work and forward the request to a JSP that would display the HTML and Javascript code.

我假设当有人访问诸如http://site.com/Signup之类的URL时,将加载Signup servlet,它将执行所有必要的工作并将请求转发到显示HTML和Javascript代码的JSP。

If there is a certain javascript component that relies on a GWT component, it will be linked to from within the <script type='...'></script> tags.

如果某个javascript组件依赖于GWT组件,它将从

If that's true, then is it possible to put the GWT code in the same project? Or do I need to create 2 projects, one for the Servlets/server-side code and one for GWT?

如果这是真的,那么可以将GWT代码放在同一个项目中吗?或者我是否需要创建2个项目,一个用于Servlet /服务器端代码,另一个用于GWT?

Another reason I'm asking this, is because when I create a new Dynamic Web project through Netbeans or Eclipse, it creates lots of folders such as build, dist, src, web, meta-inf, etc (I suppose these are due to TomCat), while when I create a project for GWT it creates some different folders. So my question is, can the two be merged together in 1 project, and if so, how?

我问这个问题的另一个原因是,当我通过Netbeans或Eclipse创建一个新的Dynamic Web项目时,它创建了很多文件夹,例如build,dist,src,web,meta-inf等(我想这些是由于TomCat),当我为GWT创建项目时,它会创建一些不同的文件夹。所以我的问题是,两者是否可以在一个项目中合并在一起,如果是这样,怎么样?

1 个解决方案

#1


Heres a tutorial on using GWT with your servlets.

下面是关于在servlet中使用GWT的教程。

#1


Heres a tutorial on using GWT with your servlets.

下面是关于在servlet中使用GWT的教程。