Hello,
You cannot say to a servlet that he must open a new window...
But you can do this with javascript !!!
for example :
<SCRIPT LANGUAGE="JavaScript">
<!--
function goServlet()
{
window.open("servlet/myservlet","Example","toolbar=0,location=0,directories=
0,menuBar=0,scrollbars=0,resizable=0,width=280,height=500left=100,top=100");
}
//-->
</SCRIPT>
...
<FORM ACTION="javascript:goServlet()" NAME="Myform" METHOD="POST">
...
</FORM>
I haven't tested this code but it seems to be ok ;)
Good luck !
Thierry
-----Message d'origine-----
De: Vikrant Satam [mailto:[EMAIL PROTECTED]]
Date: jeudi 19 octobre 2000 21:13
�: [EMAIL PROTECTED]
Objet: 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