Fixed my problem...

PrintWriter out = resp.getWriter();
out.println( "<SCRIPT>\n" );
out.println( "top.location.replace(\"" + "http://www.yahoo.com" + "\")\n");
out.println( "</SCRIPT>\n" );

"http://www.yahoo.com"

wrong slashes....


Joel Berger
E-Commerce Center of Excellence
Phone: (416) 926-3466
200 Bloor St East, NT3-B39
Toronto, Ontario M4W 1E5
---------------------- Forwarded by Joel Berger/US Division/Manulife on 10/13/99
07:32 PM ---------------------------


Joel Berger <[EMAIL PROTECTED]> on 10/13/99 07:11:29 PM

Please respond to "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Joel Berger/US Division/Manulife)
Subject:  Page Redirection and Target="top"




Hi All,

I have a servlet that needs to redirect to another page (html page so callPage
is out!) which should be outside the current frameset. In html I would code the
link as follows:

HREF="http://www.yahoo.com"  target="_top"

In my servlet I can't seem to get this to work...I've tried the following:

resp.sendRedirect(full_page_name);
     where full_page_name is "http://www.yahoo.com  target='_top'"

and

PrintWriter out = resp.getWriter();
out.println( "<SCRIPT>\n" );
out.println( "top.location.replace(\"" + "http:\\www.yahoo.com" + "\")\n");
out.println( "</SCRIPT>\n" );

Anyone have any ideas? Would a Meta Tag work for this?


Joel Berger
E-Commerce Center of Excellence
Phone: (416) 926-3466
200 Bloor St East, NT3-B39
Toronto, Ontario M4W 1E5

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to