本文介绍了GWT和web.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我试图学习GWT。我习惯于在web.xml文件中看到servlet条目。我看到一些GWT项目示例在web.xml中没有条目,它仍然有效。这是怎么回事?据我所知,纠正我,如果我错了,你没有办法编程设置servlet映射,直到servlet 3.0。我的问题是,GWT如何工作而不必在web.xml中配置任何servlet?

解决方案

示例或示例你已经看到,也许没有任何服务器端代码。
编译时的GWT是所有javascript代码。
服务器端代码通常在服务器包下(有3个包 -
客户端 - 所有视图和UI小部件,
共享 - 将在UI和服务器之间共享的类,通常是DTO
服务器 - 所有服务器端组件(proxy / async proxy和proxyImpl) - 扩展RemoteServiceServlet

如果有服务器端组件,那些代理服务器必须是在web.xml中提到
更多信息,请点击Creating services - >


I'm trying to learn GWT. I'm used to seeing servlet entries in web.xml file. I saw some GWT project samples having no entries in web.xml and it still work. What's going on? As far as I know, correct me if I'm wrong, there's no way you could programmatically set servlet mappings until servlet 3.0. My question is, how does GWT work without having to configure any servlets at all in web.xml?

解决方案

The examples or samples you have seen, perhaps do not have any server side code.GWT when compiled is all javascript code.Server-side code usually goes under server package ( there are 3 packages -client - all Views and UI widgets ,shared - classes that will be shared between UI and Server, typically DTOserver - all server side components. ( proxy / async proxy and proxyImpl ) - extends RemoteServiceServlet

If there was a server side component, those proxies would have to be mentioned within web.xmlMore info here , under "Creating services" -> http://www.gwtproject.org/doc/latest/DevGuideServerCommunication.html

这篇关于GWT和web.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 00:36