blobstore上传代码无法正常工作

时间:2010-04-09 07:17:07

标签: java google-app-engine blobstore

<body>
    <form action="<%= blobstoreService.createUploadUrl("/upload") %>" 
          method="post" 
         enctype="multipart/form-data"
    >
        <input type="file" name="myFile">
        <input type="submit" value="Submit">
    </form>
</body>

上面的代码在编译时抛出java.lang.NoSuchMethodError。我无法理解上面代码中的blobstoreService是什么?

1 个答案:

答案 0 :(得分:1)

您缺少标题

&lt;%@ page import =“com.google.appengine.api.blobstore.BlobstoreServiceFactory”%&gt; &lt;%@ page import =“com.google.appengine.api.blobstore.BlobstoreService”%&gt;

&LT;%     BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); %GT;

             上传测试                   “method =”post“enctype =”multipart / form-data“&gt;