Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Opening content in a new window.  RSS feed

 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy.

In my current project, I generate a pdf (using iText) within my Action class and display it to the user.

What do I have to change so that the pdf is opened in a new window instead of the current one that the user is viewing?

Can I send a command to the clients browser to open a new window first? If so, how would I specify to use the new window instead of the original?
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set the header's Content-disposition to attachment.

If you'd rather keep it inline, then you'll probably have to do something with target="_blank" and refresh the new page to hit the Action that generates the pdf and display it there.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!