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