You cannot send the output of a servlet to different windows, this is a
client side issue. The servlet receives a request and then returns its
output; it's up to the client to do anything with it.
I don't know how to solve your specific problem, but some combination of
client side javascript might do the trick, with two different servlets (one
to generate the HTML in the first window, one to generate the HTML in
the other HTML). Possibly, you could use just one servlet and then include
some kind of parameter so the servlet knows which window's content it is
supposed to generate.
[ Matthias Carlsson ]
[ Programmer (Java, CGI/Perl, Javascript, HTML) ] [ Web Designer ]
[ E-Mail : [EMAIL PROTECTED] ] [ ICQ: 1430647 ]
[ http://home1.swipnet.se/~w-18931/programming/ ]
> -----Ursprungligt meddelande-----
> Fr�n: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]F�r Vikrant Satam
> Skickat: den 19 oktober 2000 21:13
> Till: [EMAIL PROTECTED]
> �mne: Servlet response in multiple windows?
>
>
> Hi,
>
> Is it possible for a servlet to direct / redirect its response to
> multiple windows?
>
> My HTML form 'A' has a submit button linked to a servlet. When I click
> on the submit, I need to start 2 new browser windows. The response
> generated from the servlet should be displayed in these new windows. The
> content in these new windows is not the same.
>
> For a single browser instance instead of 2, I used 'target=new' in the
> '<form...></form>'. This works fine and the servlet response is sent to
> the new browser window. I dont know how to make this work for 2 windows.
>
> I am using Netscape 4.7. If anyone has used the setHeader attribute, can
> this attribute be used to redirect output to different windows? I know
> it can be done so for frames within the same page!
>
> A solution is possible using Javascript where the servlet response has
> an 'onload' event. This event would make the new browser instances and
> load the servlets. I would like to know if this can be implemented using
> server side logic.
>
> Any help is appreciated,
>
> Thanks and Regards,
> Vikrant
>
> __________________________________________________________________
> _________
> 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