Open a PDF or Word doc using a Struts Action without losing the page?

Discussion in 'Java' started by sygsix@gmail.com, Sep 27, 2005.

  1. Guest

    Hello everyone.

    I have been calling a struts action in a normal HTML form like this:

    <form name="SeeDocumentForm" method="post" action='<html:rewrite
    href="SeeDocument.do" />' target="_new" method="post" >

    To be honest, I had forgotten *why* I used "target='_new'" -- why, that
    is, I opened a new explorer window when all I really want to do is
    launch either Word or Acrobat to see the file.

    Then I remembered -- everything works ok in Firefox but in IE it
    launches Word / Acrobat but I lose the page I was viewing. I imagine
    that this is because the Action I am using has no "forward". This is by
    design; there is no need for a forward because I am simply launching an
    external app (Word, Acrobat) and spitting out some data, no reason to
    navigate to another page.

    But IE doesn't like it. And it doesn't matter if I change the POST to
    GET or if I call the struts Action directly in a URL:

    <a href='<html:rewrite href="SeeDocument.do" />id=1'>View</a>

    .... same deal. It launches the external app but the page goes blank.

    Anyway ideas?

    Thanks in advance,
    syg
    , Sep 27, 2005
    #1
    1. Advertising

  2. Re: Open a PDF or Word doc using a Struts Action without losing thepage?

    wrote:


    > .... same deal. It launches the external app but the page goes blank.
    >
    > Anyway ideas?


    Educate IE users as to the value of the 'back' button?
    Andrew Thompson, Sep 27, 2005
    #2
    1. Advertising

  3. Guest

    Funny, but not very helpful.

    :)

    syg
    , Sep 27, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sharon
    Replies:
    0
    Views:
    598
    Sharon
    Jul 27, 2005
  2. Franck
    Replies:
    1
    Views:
    4,844
  3. Joe Bloggs
    Replies:
    1
    Views:
    747
    Sudsy
    Aug 3, 2003
  4. rjweytens
    Replies:
    6
    Views:
    16,083
    rjweytens
    Jun 25, 2004
  5. Matt
    Replies:
    3
    Views:
    499
    Tor Iver Wilhelmsen
    Sep 17, 2004
Loading...

Share This Page