Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java / Struts : Open document in a Popup using Struts Action

 
moi tulou
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

For my project using Struts, I need to open a document in a popup.

This document is generated "online". I'm using Struts DownloadAction and it works fine but it opens the document in my main page. What I need is to open it in a popup AFTER the DownloadAction is done.

Someone has an idea to help me ?

Kind regards and thanks in advance for your help
 
Rob Spoor
Sheriff
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Struts forum.
 
moi tulou
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For your information, I found the answer on "Struts Wiki" :
http://wiki.apache.org/struts/StrutsFileDownload#Implementing_a_DownloadAction

I only add the following configuration :
response.setHeader("Content-disposition", "attachment;)

This opens a Popup to allow the user to open/save the document.

Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic