• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic