【问题标题】:Deploy vaadin app to Google App Engine - Error NOT_FOUND将 vaadin 应用程序部署到 Google App Engine - 错误 NOT_FOUND
【发布时间】:2014-05-10 16:55:29
【问题描述】:

我成功部署了一个 Vaadin 应用程序,但是在调用它时我看到了ERROR : 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>

【问题讨论】:

    标签: google-app-engine vaadin web.xml


    【解决方案1】:

    Vaadin Eclipse 插件不会创建适用于 vaadin 应用程序的 web.xml。在 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>
    

    【讨论】:

      猜你喜欢
      • 2016-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-27
      • 2014-07-27
      • 1970-01-01
      • 2019-07-12
      • 1970-01-01
      相关资源
      最近更新 更多