• 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

Getting JSON popup to save or open dialog instead of actual content?

 
Greenhorn
Posts: 2
Hibernate jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I just started using struts 2 last week so this question may be obvious. I have an opening form with a submit that uses an action and execute method to get the data. Then, the only way I could get jquery to work was to put an action and execute method that just returns 'success' and then I go onto my jquery grid with a 3rd action.

whenever i am try to execute my program on browser The only problem i have is, that the json string returns as a file. So when i call the getJSONResult action it will give me a file with the json string in it, which i can open or download . .

. Example : http://www.google.co.in/imgres?q=JSON+download+as+file&um=1&hl=en&client=firefox-a&sa=N&rls=org.mozilla:en-US:official&biw=1366&bih=575&tbm=isch&tbnid=KmaETq1pqGWqJM:&imgrefurl=http://www.mkyong.com/webservices/jax-rs/download-json-from-jax-rs-with-jaxb-resteasy/&docid=A9pzMEPWONMK7M&imgurl=http://www.mkyong.com/wp-content/uploads/2011/07/jaxb-json-resteasy.png

http://www.google.co.in/imgres?q=JSON+download+as+file&um=1&hl=en&client=firefox-a&sa=N&rls=org.mozilla:en-US:official&biw=1366&bih=575&tbm=isch&tbnid=6dCGCGeSa7di_M:&imgrefurl=http://www.dotnetcurry.com/ShowArticle.aspx%3FID%3D596&docid=ecziYCCdZg_cPM&imgurl=http://www.dotnetcurry.com/images/silverlight/26102010image_1.jpg

So i think it’s a configuration problem, but i can’t find it. I would be very glad if somebody could help me, thanks guys!
 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic