<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是什么?
答案 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;