If I understand correctly, this is an applet question,
not a cocoon question:  How do you overwrite the
contents of a browser window with a string containing
html from an applet. It sounds like you've
successfully retrieved your results from cocoon.

As such, I don't know you'll find the right people
here (though you may).  Although my applet experience
is minimal, I don't think you can do what you want
using the applet api alone.

Geoff Howard

--- "Skladovs, Victor" <[EMAIL PROTECTED]> wrote:
> Hi to all!
> 
> I sent this question with a help cry yesterday but
> nobody replied -:(((
> Does the silence of the group mean that nobody has
> faced this problem so
> far?
> 
> Anyway, I'll try one more time.
> 
> My goal is to pass the parameters from an applet to
> cocoon with POST
> method and receive a HTML Page back. I haven't
> managed to get this so
> far :-(
> 
> What I've done:
>       1)      In my applet:
> 
> URL url = new
> URL("http://myserver.de/cocoon/page.html";);
> URLConnection connection = url.openConnection();
> connection.setDoOutput(true);
>
connection.setRequestProperty("Content-Type","text/html");
> PrintWriter out = new
> PrintWriter(connection.getOutputStream());
> out.print("user=" + URLEncoder.encode("user") +
> "&");
> out.print("password=" +
> URLEncoder.encode("password"));
> out.close();
> 
> This is of course only a example: if it was only for
> these two
> parameters, I would pass them with GET method:
> applet.getAppletContext().showDocument(
>
"http://myserver.de/cocoon/page.html?user=user&password=password";);
> 
> It works perfect. But actually I'd like to pass to
> cocoon a vector with
> parameters.
> 
>       2)      In my sitemap.xmap :
> 
>                       <map:match pattern="page.html">
>                               <map:generate
> src="docs/samples/xsp/page.xsp" type="serverpages"/>
>                               <map:transform
> src="stylesheets/xml2html.xsl">
>                                       <map:parameter
> name="view-source" value="
> docs/samples/xsp/page.xsp"/>
>                               </map:transform>
>                               <map:serialize/>
>                       </map:match>
> 
> 
> 3)my page.xsp:
> 
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp";
>
xmlns:xsp-request="http://apache.org/xsp/request/2.0";
> xmlns:esql="http://apache.org/cocoon/SQL/v2";>
>       <page title="My HTML Page" bgcolor="#FFFFC0">
>               <table>
>                       <tr>
>                               <td>
>                                       <p align="left">
>       
> <xsp-request:get-parameter name="user"/>
>                                       </p>
>                                       <p align="left">
>       
> <xsp-request:get-parameter name="password"/>
>                                       </p>
>                               </td>
>                       </tr>
>               </table>
>       </page>
> </xsp:page>
> 
> 
> 
>       4) Again in applet :
> 
>               If I open BefferedReader (only to test), I can see
> that
> cocoon has really done
> his job - the HTML page exists, I can read it as a
> String in my
> Java-Console , but I don't see it in my browser!!!
> 
>            BufferedReader in = new
> BufferedReader(new
> InputStreamReader(connection.getInputStream()));
>               String line;
>             while((line = in.readLine()) != null){
>                 System.out.println(line);
>             }
>             in.close();
> 
>       QUESTION: What have I done wrong? What do I have to
> do to get my
> HTML Page be seen in browser?
> 
>       Thanks to all in advance!
> 
>       Viktor
> 
> 
>
---------------------------------------------------------------------
> Please check that your question  has not already
> been answered in the
> FAQ before posting.    
> <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:    
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to