aspose file tools*
The moose likes Struts and the fly likes Java / Struts : Open document in a Popup using Struts Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Java / Struts : Open document in a Popup using Struts Action" Watch "Java / Struts : Open document in a Popup using Struts Action" New topic
Author

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

moi tulou
Greenhorn

Joined: Oct 06, 2010
Posts: 3
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

Joined: Oct 27, 2005
Posts: 19542
    
  16

Moving to our Struts forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
moi tulou
Greenhorn

Joined: Oct 06, 2010
Posts: 3
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java / Struts : Open document in a Popup using Struts Action
 
Similar Threads
Old Struts and content-type/attachments
use photographs in the database like orkut.com
File Upload Question
read an image from server in action class using struts1.2
Refresh parent window without closing popup with struts validation