我有这个web.xml:
<?xml version="1.0" encoding="UTF-8"?><web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>TestVaadin</display-name>
<context-param>
<description>
Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<servlet>
<servlet-name>TestvaadinApplication</servlet-name>
<servlet-class>
com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
<init-param>
<description>
Vaadin application class to start</description>
<param-name>application</param-name>
<param-value>com.example.testvaadin.TestvaadinApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>TestvaadinApplication</servlet-name>
<url-pattern>/TestvaadinApplicationServlet/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TestvaadinApplication</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
我正在尝试从eclipse进行调试,我是个新手,但是我不明白为什么在默认http post时我会得到404,或者如果我调用/VAADIN/,为什么会得到500。无论我做什么,我都得不到代码的结果。Vaadin没有说太多,所以我在很多关于gwt的网站上转了转…
相反,如果我在firefox中使用/VAADIN/,我会得到一些下降视图。有谁知道我的地址url应该是什么才能正确地指向这个web.xml?
对于web.xml,or...what应该是一个下降设置。2天我不能再继续下去了:-(
发布于 2011-04-05 19:55:50
您的URL应该是(因为您使用的是Eclipse):
localhost:{Tomcat端口}/{Eclipse项目名称}/TestvaadinApplicationServlet/
如果我没记错的话,那么Eclipse会自动为您创建一个*.war,并将其部署到Tomcat安装程序的/webapps目录中(假设您使用的是Tomcat),默认情况下,war是以Eclipse项目命名的。
https://stackoverflow.com/questions/5550399
复制相似问题