Hi !!

Here is the solution to your query.
Here are the contents of the file Test.jsp:

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<Script language="javascript">
function doTest()
{
        var vHandle;
        vHandle=window.open("");
        vHandle.document.writeln("Hello . It is magic");
}

</Script>

</HEAD>
<BODY>

<P><INPUT id=button1 type=button value="Click Me" name=button1
onClick="doTest()"></P>

</BODY>
</HTML>

Hope this helps.

Regards,
Sandeep

Disclaimer:
This document is intended for transmission to the named recipient only.  If
you are not that person, you should note that legal rights reside in this
document and you are not authorized to access, read, disclose, copy, use or
otherwise deal with it and any such actions are prohibited and may be
unlawful. The views expressed in this document are not necessarily those of
HCL Technologies Ltd. Notice is hereby given that no representation,
contract or other binding obligation shall be created by this e-mail, which
must be interpreted accordingly. Any representations, contractual rights or
obligations shall be separately communicated in writing and signed in the
original by a duly authorized officer of the relevant company.




-----Original Message-----
From: Brian P Bohnet [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 7:45 PM
Subject: Re: How can I write the result of the request in another
window?


Luca,
    My first thought would be to try to include javascript in your response
that
would be called by using '<body onLoad="openAWindow()">'. This way, in your
servlet you can use any dynamic data you wish to include in the javascript
function that will write to the new window from the existing response.
    I have not written code to do it, but if you need some help I may have a
little time to experiment. Let me know.

Brian

Luca Ventura wrote:

> Hello everybody!
>
> I have the following problem with my web application...
>
> I would like to send all the data of a request to a servlet through an
HTML
> form (it can be present in a JSP page) and write the result in another
> window (not that one where the form was displayed), in some words the
things
> I want to do are:
>
> 1)To send my requerst to the servlet through an HTML form
> 2)Read the result of the request
> 3)Open a new window
> 4)Write the result in the new window just opened
>
> I know how to send the HTML form to the servlet but I don't know how I can
> read the result (that can be a string or html code) returned by the
servlet
> and write it in another window:-(
>
> In fact the servlet returns the result string (or html code) through this
> java code:
>
> PrintWriter Out=new PrintWriter(res.getOutputStream());
> res.setContentType("text/html");
> Out.println(risultato);
> Out.close();
>
> In this way the result is displayed in the current window after deleting
the
> old page, but I would like
> the result is written in ANOTHER window: so if something in sending the
form
> goes wrong I can send the form to the servlet a second time without
> inserting the data in the form a second time.
>
> How can I do?
>
> Thank you very much in advance!
>
>                       Luca
>
>
===========================================================================
> 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://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===========================================================================
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://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to