Your looking at it from the wrong angle. A servlet will not open a new
browser window for you as the servlet is on the server and the browser is on
the client. What you need to do is use JavaScript to open the new window to
display the results from the servlet. If you create a JavaScript function
like the following:
<script language="javascript">
<!-- hide this script from non-JavaScript-enabled browsers
function NewWin (winURL)
{
newWindow =
window.open(winURL,'newWinObj','scrollbars=yes,resizable=yes,width=400,heigh
t=400');
}
// stop hiding -->
</script>
Then what you can do is use the function in a link:
<a href="javascript:NewWin('/MyServlet?Param1=ID');">Link Text</a>
Hope this helps
Lee
_________________________________
Lee Turner
Systems Developer
Information Technology Leeds
_________________________________
Watt Gilchrist Ltd
Ring Road, West Park
Leeds, LS16 6RA
Tel: 0113 288 3200
Fax: 0113 275 1690
http://www.wattgilchrist.co.uk
_________________________________
> -----Original Message-----
> From: Vacca Davide [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 17, 2001 9:26 AM
> To: [EMAIL PROTECTED]
> Subject: Opening a new Web browser inside a servlet
>
> Hello to everybody,
>
> My problem is simple but I really don't know how to figure out it;
> simply I have to write a servlet which writes the results as form HTML in
> a new Web browser.
> i.e. I select, from a Web page, a parameter which I pass to a servlet and
> the servlet must show the results in a a new web page since I don't want
> lose the first HTML page (to allow the user to make a new, different
> selection, for example). I've though to write the new HTML page in a
> different broser, but I have not any idea how to open it from a servlet.
> Advanced thanks to everybody will help me.
>
> Ing. Vacca Davide
> Zucchetti Methosystem S.r.L.
> Via VIII Marzo
> Collecchio (PR)
> - Italy -
> [EMAIL PROTECTED]
>
> __________________________________________________________________________
> _
> 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