验证appengine-web.xml时发生GWT内部错误

时间:2013-03-24 13:57:24

标签: xml google-app-engine font-awesome

当我尝试部署到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>

有人能看出问题是什么吗?

编辑这就是我的war文件结构: enter image description here

1 个答案:

答案 0 :(得分: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>