Vaadin web.xml 设置
我有这个 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 的下降设置应该是什么。 2天我不能再进一步了:-(
I have this 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>
I am trying to debug from eclipse, and I am new at this, but I can't understand why I get 404 at te default http post, or 500 if I call /VAADIN/ instead. What ever I do, I don't get the result of the code. Vaadin doesn't say much so I go around with numerous sites about gwt...
On the contrary, if I do it in firefox, with /VAADIN/ I get some descent view.
does anyone have a clue what should be my address url to point correctly with this web.xml?
or...what should be a descent setup for web.xml. 2 days I can't go further than that :-(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 URL 应该是(因为您使用的是 Eclipse):
localhost:{Tomcat Port}/{Eclipse Project Name}/TestvaadinApplicationServlet/
如果我没记错的话 Eclipse 会自动为您创建一个 *.war 并将其部署到 /webapps在 Tomcat 安装目录(假设您使用的是 Tomcat)中,该 war 默认情况下以 Eclipse 项目命名。
Your URL should be (since you're using Eclipse):
localhost:{Tomcat Port}/{Eclipse Project Name}/TestvaadinApplicationServlet/
If I'm not mistaken Eclipse automatically creates a *.war for you and deploys it to the /webapps directory of your Tomcat install (assuming you're using Tomcat), that war is by default named after the Eclipse project.