当我尝试部署我的 App Engine 项目时,显示以下验证错误:
An internal error occurred during: "Deploying Guestbook to Google". XML error validating C:\Users\Adrian\workspace\Guestbook\war\WEB-INF\appengine-web.xml against C:\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.5.0.r36v201105092302\appengine-java-sdk-1.5.0\docs\appengine-web.xsd
这是我的 appengine-web.xml:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>adrianschaeferandroid</application>
<version>1</version>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />
</system-properties>
<static-files>
<include path="/favicon.ico" />
</static-files>
<static-files>
<include path="stylesheets/main.css" />
</static-files>
</appengine-web-app>
任何人都可以看到验证错误吗?我可以发布 appengine-web.xsd 吗?
最佳答案
你只能有 1 个 static-files
元素。如果您有多个 include
,您应该将它们全部嵌套在一个 static-files
元素中。
因此正确的 appengine-web.xml 应该是:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>adrianschaeferandroid</application>
<version>1</version>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />
</system-properties>
<static-files>
<include path="/favicon.ico" />
<include path="stylesheets/main.css" />
</static-files>
</appengine-web-app>
关于java - appengine-web.xml - XML 错误验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6161694/