1

当我尝试部署到 GAE 时,出现错误:

针对 appengine-web.xsd 验证 appengine-web.xml 的 XML 错误

我的appengine-web.xml看起来像这样:

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>whatever</application>
<version>0-8-4</version>

<!-- Configure serving/caching of GWT files -->
<static-files>
  <include path="**" />

  <!-- The following line requires App Engine 1.3.2 SDK -->
  <include path="**.nocache.*" expiration="0s" />

  <include path="**.cache.*" expiration="365d" />
  <exclude path="**.gwt.rpc" />

  <!-- To use Font Awesome in Firefox -->
  <include path="/../**" >
       <http-header name="Access-Control-Allow-Origin" value="*" />
  </include>
</static-files>

<!-- Configure java.util.logging -->
<system-properties>
   <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>

<threadsafe>true</threadsafe>
</appengine-web-app>

导致错误的行是:

  <!-- To use Font Awesome in Firefox -->
  <include path="/../**" >
       <http-header name="Access-Control-Allow-Origin" value="*" />
  </include>

之前他们是这样的,但这也给出了同样的错误:

<include path="/../font" >
    <http-header name="Access-Control-Allow-Origin" value="*" />
</include>
<include path="/../css" >
    <http-header name="Access-Control-Allow-Origin" value="*" />
</include>

任何人都可以看到有什么问题吗?

编辑这是我的战争文件结构的样子: 在此处输入图像描述

4

1 回答 1

1

最后,它对我有用:

<!-- Configure serving/caching of GWT files -->
<static-files>
  <!-- To use Font Awesome in Firefox -->
  <include path="**" >
     <http-header name="Access-Control-Allow-Origin" value="*" />
  </include>

  <!-- The following line requires App Engine 1.3.2 SDK -->
  <include path="**.nocache.*" expiration="0s" />

  <include path="**.cache.*" expiration="365d" />
  <exclude path="**.gwt.rpc" />

</static-files>
于 2013-03-26T10:30:12.590 回答