更新见下文
我正在尝试从这个谷歌教程构建这个 blobstore 应用程序引擎示例:
https://developers.google.com/appengine/docs/java/blobstore/#Uploading_a_Blob
这就是我所拥有的。我可以选择要上传的文件。
http://instantedituploader.appspot.com/
当我点击提交时,我收到此错误:
Error: Not Found
The requested URL /%3C%=%20blobstoreService.createUploadUrl(?foo=&myFile=sprayerpic.jpg was not found on this server.
我很确定我错过了:
<%@ page import="com.google.appengine.api.blobstore.BlobstoreServiceFactory" %>
<%@ page import="com.google.appengine.api.blobstore.BlobstoreService" %>
<%
BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
%>
我把它拿出来是因为我不知道如何将它包含在 index.html 中。本教程使用一个 jsp 文件来包含上述内容和上传表单/提交的 html。我该怎么做呢?
更新 - - - - - - - - - - -
好的,我将 index.jsp 切换到了我的欢迎文件。现在我收到 500 服务器错误,这就是应用引擎控制台中显示的内容,我也收到 /favicon.ico 错误。
013-09-18 08:33:08.601 / 500 3477ms 0kb Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Ubuntu/12.10 Chromium/22.0.1229.94 Chrome/22.0.1229.94 Safari/537.4
W 2013-09-18 08:33:08.412 EXCEPTION java.lang.ClassNotFoundException: Serve at com.google.appengine.runtime.Request.process-cb1588546d641fbb(Request.java) at java.lang.Class
E 2013-09-18 08:33:08.414 javax.servlet.ServletContext log: unavailable javax.servlet.UnavailableException: Serve at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
W 2013-09-18 08:33:08.419 EXCEPTION java.lang.ClassNotFoundException: Upload at com.google.appengine.runtime.Request.process-cb1588546d641fbb(Request.java) at java.lang.Clas
E 2013-09-18 08:33:08.420 javax.servlet.ServletContext log: unavailable javax.servlet.UnavailableException: Upload at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
W 2013-09-18 08:33:08.591 Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@d206ca{/,/base/data/home/apps/s~instantedituploader/1.370311
C 2013-09-18 08:33:08.597 Uncaught exception from servlet javax.servlet.UnavailableException: Initialization failed. at com.google.apphosting.runtime.jetty.AppVersionHandlerMa
I 2013-09-18 08:33:08.600 This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This requ