File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Portals and Portlets and the fly likes Ajax POST to upload a file to resource portlet and download a file back Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Ajax POST to upload a file to resource portlet and download a file back" Watch "Ajax POST to upload a file to resource portlet and download a file back" New topic
Author

Ajax POST to upload a file to resource portlet and download a file back

E. Tse
Greenhorn

Joined: Oct 13, 2007
Posts: 19
i have the following functional requirement:

- a form have a file input
- once user clicks submit, the page should stay at there
- server side converts the input file and then return back a file to user to download

i have done:
- using ajax to post the file to a resource mvc portlet (serveResource)
- using portlet output stream to write back the file being download...

my problem is:
- the ajax call could not go to complete state (cannot alert something after the ajax call)
- the file cannot be downloaded even though i write something to output

my another use case works fine if using GET in ajax call...

any hints ?? seems ajax cannot post to an url and then get something back, is it true ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ajax POST to upload a file to resource portlet and download a file back