servlet help - redirecting from within a framed servlet

Discussion in 'Java' started by ppcguy, Aug 8, 2005.

  1. ppcguy

    ppcguy Guest

    i've got a servlet running in a frame window.

    in certain situations, i'd like to redirect the user to
    a new page...complete new frame.

    in html it would be done with the TARGET attribute.
    <A HREF="/new-url" TARGET="_parent">New link</A>

    is this possible in a servlet.

    the HttpRespons sendRedirect() method does not for the
    specification of a target.
    ppcguy, Aug 8, 2005
    #1
    1. Advertising

  2. ppcguy wrote:
    > i've got a servlet running in a frame window.
    >
    > in certain situations, i'd like to redirect the user to
    > a new page...complete new frame.
    >
    > in html it would be done with the TARGET attribute.
    > <A HREF="/new-url" TARGET="_parent">New link</A>
    >
    > is this possible in a servlet.


    no. HTTP is a simple request/response protocol: you ask for a file, you
    get it. The client knows where to put it, not the server. A servlet is
    no exception.
    You have to redirect to a middle page that will have the task to remove
    the frame.
    Andrea Desole, Aug 8, 2005
    #2
    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. =?Utf-8?B?Q2hyaXN0b3BoZXI=?=

    Sessions when using Framed web site?

    =?Utf-8?B?Q2hyaXN0b3BoZXI=?=, Jan 25, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    326
    Steve C. Orr [MVP, MCSD]
    Jan 26, 2004
  2. =?Utf-8?B?Q2xhcw==?=
    Replies:
    0
    Views:
    1,477
    =?Utf-8?B?Q2xhcw==?=
    Nov 10, 2005
  3. Chumpmeister

    help read URL from framed JSP

    Chumpmeister, May 28, 2004, in forum: Java
    Replies:
    2
    Views:
    2,277
    ExGuardianReader
    May 29, 2004
  4. DiLu790

    Way to Redirect Framed Page???

    DiLu790, Dec 14, 2003, in forum: HTML
    Replies:
    24
    Views:
    1,106
    Hywel Jenkins
    Dec 16, 2003
  5. Paul F. Johnson

    Replacing a framed website with css

    Paul F. Johnson, Sep 24, 2004, in forum: HTML
    Replies:
    8
    Views:
    1,895
    Paul F. Johnson
    Sep 26, 2004
Loading...

Share This Page