my dog learned polymorphism*
The moose likes Servlets and the fly likes Calling Servlet with contenttype = application/force-download from javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling Servlet with contenttype = application/force-download from javascript" Watch "Calling Servlet with contenttype = application/force-download from javascript" New topic
Author

Calling Servlet with contenttype = application/force-download from javascript

Manish Ramrakhiani
Ranch Hand

Joined: Aug 20, 2009
Posts: 44
Hi All,

I need to call a Controller on Spring framework whose content-type is "application/forcedownload" from a javascript function.
I could successfully call it from an Ajax call but do not understand why Servlet was not popping up the file(there were no exceptions).

Could you please tell me how can I achieve the same; Can it be done the way I am doing it or how can I call the controller directly from javascript function

Thanks,
Manish Ramrakhiani
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Calling Servlet with contenttype = application/force-download from javascript
 
Similar Threads
jsp and javascript
Calling a Servlet (Urgent)
How to call Javascript function from an Application.
JOptionPane No X11 DISPLAY error
calling a servlet from javascript function??