0
<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 是什么?

4

1 回答 1

1

您缺少标题

<%@ page import="com.google.appengine.api.blobstore.BlobstoreServiceFactory" %> <%@ page import="com.google.appengine.api.blobstore.BlobstoreService" %>

<% BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); %>

上传测试" method="post" enctype="multipart/form-data">

于 2010-10-16T23:46:06.843 回答