Vaadin web.xml setup
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>Tes开发者_高级运维tvaadinApplication</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 :-(
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.
精彩评论