I try to save file information such as filename,blobkey,Date  when
uploading a file
, and print all of that later on JSP. It works flawless on localhost,
but after deploy to app engine
my JSP can not dynamic create filename, can anyone tell me what's
wrong, thx very much

below is part of my code

upload code:
skip...
String subjectID = req.getParameter("subjectID");
Map<String, BlobKey> blobs = blobstoreService.getUploadedBlobs(req);
BlobKey blobKey = blobs.get("myFile");
if (blobKey == null) {
res.sendRedirect("/");
} else {
BlobInfo info = new BlobInfoFactory().loadBlobInfo(blobKey);
                        String fileName=info.getFilename();
                        fileName=new 
String(fileName.getBytes("ISO-8859-1"),"UTF-8");
                        Date createDate=info.getCreation();
                        SubjectFile a=new SubjectFile();
                        a.save(subjectID, blobKey,fileName,createDate);
                        res.sendRedirect("./JSP/list2.jsp");

JSP:
         List<SubjectFile> subjectlist=sub.getSubjectfile();
                             for(SubjectFile a:subjectlist){
                       String fileName=a.getFileName();
                                out.println("<a 
href=/serve?key="+a.getBlobKey().getKeyString()
+ ">"+fileName+"</a><br>");
                            }

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to