仅将静态文件上传到Google App Engine

时间:2009-09-30 05:52:02

标签: google-app-engine

我的目的是将静态html文件上传到谷歌应用引擎。 没有servlet,没有JSP。

我有以下目录结构

C:\Users\yccheok\Desktop\sandbox\index.html
C:\Users\yccheok\Desktop\sandbox\WEB-INF\appengine-web.xml
C:\Users\yccheok\Desktop\sandbox\WEB-INF\web.xml

appengine-web.xml的内容是

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

web.xml的内容是

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
</web-app>

我使用以下命令:

C:\Users\yccheok\Desktop\sandbox>c:\appengine-java-sdk-1.2.2\bin\appcfg.cmd upda
te .

但它只是挂在那里:

Reading application configuration data...
2009-09-30 13:43:51.061::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
Beginning server interaction for xiang-qi...
0% Creating staging directory
5% Scanning for jsp files.
20% Scanning files on local disk.
25% Initiating update.
Email: yancheng.cheok@gmail.com
Password for yancheng.cheok@gmail.com:
Email: yancheng.cheok@gmail.com
Password for yancheng.cheok@gmail.com:

2 个答案:

答案 0 :(得分:1)

您需要明确指定静态文件的路径 - 有关详细信息,请参阅the docs。但是,如果appcfg只是挂起,那看起来就像是一个单独的问题。你是某种代理服务器吗?

答案 1 :(得分:0)

我听说部署Java应用程序的故事比Python应用程序慢。您可以考虑使用Python或Go运行时(我假设Go运行时类似于Python运行时)。您可以检查三个适合哪一个更好(是否足够快,是否更喜欢通过XML编辑YAML,将来用于应用程序的未来版本的语言等)然后使用它。

我不确定您是否可以在不同版本的应用上使用不同的运行时。尝试应该很有趣。