At 09:17 AM 4/12/01 -0700, you wrote:
>-----Original Message-----
>
>On Question 1:
>
>Since a.html one of the frame pages so when redirected, b.jsp sqiushed
>inside the frame What I really want is to have b.jsp completely leaving the
>frame pages and pops up a full browser window.
>
>I tried the following
>res.sendRedirect("\"http://localhost:8080/jsp/b.jsp\" TARGET==\"_top\""); It
>did not work! What is wrong with that?
You have to remember that causing a new window to open is an operation of
the client itself (browser). The server can't make a browser open a new
window or do anything else. So you have to have code in the page that the
browser scripting engine can act on. You have at least two options: you can
put the 'target="_blank"' attribute in the anchor tag you use to call the
servlet - that will open a new window no matter what the results of the
login query and the results of the query will be displayed there; Or you
can include a javascript in the source page that checks for a flag onload
and if it finds the flag it will cause the frame to open in a new window.
Your jsp page would have to have the script with the flag set so that when
it is loaded into the frame, it would cause the frame to make itself the
top level window. Anyway you do it, there's going to be some javascript
involved to open a new window.
Also, if you look at the documentation of the response object sendRedirect
method, you will notice that it takes a String of the URLfor the redirect
as a parameter. What you have presented to it is not a valid URL (the '=='
operator notwithstanding). That string isn't going to get you anywhere anyway.
HTH.
Michael
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets