First, let me say that I haven't gone back to read through the servlet
AP documentation. In the event that this doesnt work, however, what
about doing this:

instead of sending the response from the servlet directly, send
javascript such as you have previously, to open the new window, and have
the target URL be "/servlet/MyServlet?error=blah"

check for the error parameter inside the doGet method of the servlet,
and if found, send the appropriate header/response. The output should
goto the new "new" window.

-Jason Parrott
[EMAIL PROTECTED]

PS: you might want to have the origional window create the new one. That
way it serves as the "root" of all the windows. Depending on what you're
doing this may be helpful in that you would be able to control all child
windows directly, and each of the child windows' parent.opener property
would refer to the same window, which I think might be more logical
anyways. Hope this helps...


Gerardo Macari wrote:
>
> I want to load a url from a servlet. I have used:
>
> res.setStatus(res.SC_MOVED_PERMANENTLY);
> res.setHeader("Location",url);
>
> where res = HttpServletResponse
>
> the problem is that I am getting the data from a form which is inside a html "window"
> i.e var win = open("url","login window") (javascript).
>
> so when I use the above code it loads the url inside the window. I want to load in a 
>new browser
> window. Is there a method akin to appletcontext.showDocument(URL url,String target), 
>so I can specify
> target = _balnk etc...
>
> thanks,
>
> gerardo

___________________________________________________________________________
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