2014-05-10 164 views
0

我成功部署了Vaadin应用程序,但在调用它时,我看到ERROR : NOT_FOUND
我想我的默认页面没有找到,因为默认页面被选中错了。将vaadin应用程序部署到Google App Engine - 错误NOT_FOUND

问题: 我该如何指出(我想在我的web.xml中)到我的默认页面?

web.xml

  <?xml version="1.0" encoding="UTF-8"?> 
      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> 
       <display-name>GoogleAppVaadin701Project</display-name> 
       <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> 
      </web-app> 

enter image description here

回答

0

Vaadin Eclipse插件不会创建web.xml中该工程vaadin应用。在vaadin的书中,你可以找到关于web.xml的部分 - https://vaadin.com/book/vaadin7/-/page/application.environment.html

以下是基本的servlet定义和映射基于书的工作正常。只需更改UI参数以指向您的UI实施

<servlet> 
    <servlet-name>myservlet</servlet-name> 
    <servlet-class> 
    com.vaadin.server.GAEVaadinServlet 
    </servlet-class> 

    <init-param> 
    <param-name>UI</param-name> 
    <param-value>com.example.higoogle.HigoogleUI</param-value> 
    </init-param> 
</servlet> 

<servlet-mapping> 
    <servlet-name>myservlet</servlet-name> 
    <url-pattern>/*</url-pattern> 
</servlet-mapping> 
相关问题