>From [EMAIL PROTECTED] Thu May 25
>04:54:00 2000
Received: from scam.xcf.berkeley.edu (scam.XCF.Berkeley.EDU [128.32.43.201]) by
lgs-systems.com (8.8.5) id EAA05695; Thu, 25 May 2000 04:54:00 -0600 (MDT)
Received: (qmail 12931 invoked by alias); 25 May 2000 10:49:32 -0000
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 12920 invoked from network); 25 May 2000 10:49:27 -0000
Received: from imr3.srv.uk.deuba.com (194.205.246.162)
by scam.xcf.berkeley.edu with SMTP; 25 May 2000 10:49:27 -0000
Received: from bmr1-e1.srv.uk.deuba.com by imr3.srv.uk.deuba.com
id LAA15650; Thu, 25 May 2000 11:48:24 +0100 (BST)
Received: from pow.srv.uk.deuba.com by bmr1-e1.srv.uk.deuba.com
id LAA00118; Thu, 25 May 2000 11:48:27 +0100 (BST)
Received: from db.com by pow.srv.uk.deuba.com
id LAA24592; Thu, 25 May 2000 11:48:26 +0100 (BST)
Message-ID: <[EMAIL PROTECTED]>
Date: Thu, 25 May 2000 11:48:26 +0100
From: Peter Pilgrim <[EMAIL PROTECTED]>
Organization: Deutsche Bank (UK)
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Problem Connecting between applet and servlet
References: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-UIDL: 6fd21cc9abb60114a4d0fce5c4a3a6c1
I would say your problem is getting the web page to update from
a applet. This is a nonsense because you will force the enitre applet
to also reload as the web page reload!!
But if you use frames then you need to force the applet to display
the web frame after invoking the servlet. I don't think there is a way
to request a servlet and redirect the output to go a separate HTML Frame.
A better way is to make applet display the info from the servlet.
You could use HTTP Tunnelling to transmit Java objects to and from
the applet and servlet.
[EMAIL PROTECTED] wrote:
>
> Hi,
>
> I was trying to connect to a servlet through an applet.I created an html
> page with two frame.At the top frame the applet was embedded and in the bottom
> frame the servlet was server side included.I used the GET method to
> communicate to the servlet.So in the init method of the applet I added the
> following code to get a connection to the servlet.And pass information through
> the URL.
> ////////////////////////////////////////////////////////
>
> String
>
>servletLocation="http://172.100.8.213:8080/servlet/serv.HelloWorldServlet1?LastName='Jones'";
> try{
> testServlet = new URL( servletLocation );
> }
> catch (MalformedURLException e){
> }
>
> try{
> servletConnection = testServlet.openConnection();
> }
> catch(IOException e){
> }
>
> ///////////////////////////////////////////////////////////////////////
> The code of the servlet is shown below,where I tried to get the information
> passed from the applet
>
> public class HelloWorldServlet1 extends HttpServlet {
>
>
> public void doGet (HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException
> {
> PrintWriter out;
>
> res.setContentType("text/html");
> out = res.getWriter();
> String name=req.getParameter("LastName");
>
> out.println("<html>");
> out.println("<head><title>Hello World</title></head>");
> out.println("<body>");
> out.println("<h1>LastName="+name+"</h1>");
> out.println("</body></html>");
> }
> }
> /////////////////////////////////////////////
>
> The output is showing a null value for the name.Is it wrong to send the
> information to the servlet from the init method.Can you suggest some other
> method or simple code for the communication.
>
> regards,
> Rakesh.
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
--
mfg
Peter
======================================================================
"The greatest trick the devil ever pulled was making everyone in the
world believe he didn't exist." Kevin Spacey as Kaiser Soze
---
To unsubscribe, mail [EMAIL PROTECTED]
To get help, mail [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]