----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Hi Fernando,

thanks for your interest. I have read your suggestion but I don't 
understand exactly.

this is the send part of sevlet code:

out.writeUTF("http://www.yfas.com.tr/IlkGiris.html");

"out" is the OutputStream of the URL socket. and the applet side this 
is read by the following statement:

      nextDoc = in.readUTF();

and the "nextDoc" is used in showDocument() method as follows:

            AppletContext ac = getAppletContext();
              try{
                 URL url=new URL(nextDoc);
                 ac.showDocument(url);
              }catch(Exception e){showStatus("Error occured"); }

Now, you suggest me to use encodeURL() istead of URL

the line: 

      URL url=new URL(nextDoc);

should be replaced by

      encodeURL url=new encodeURL(nextDoc);

this is correct?

Please send me a reply considering these if you have spare time. 

Thanks again for everything.
Deniz Demir.
----- Original Message -----
From: [EMAIL PROTECTED]
Date: Wednesday, November 29, 2000 3:39 pm
Subject: Re: common everybody

> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <" 
> target="l">http://java.apache.org/faq/>WHEN YOU POST, include all 
> relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
> 
> 
> The problem is because the first contact with JServ is through 
> your applet
> -- it is the applet
> that receives the session cookie, not the browser.  When the 
> showDocument()call is made,
> the browser is unaware of any session cookie having been sent.
> 
> My suggestion is that you use encodeURL() on the URL that comes 
> from the
> server, and
> that you intend to use in showDocument().  This should add the session
> identifier as
> a query-string parameter.
> 
> Make sure you get the mechanics with encodeURL() right.  
> encodeURL() will
> not change
> anything if JServ detects cookies are enabled on the client.  
> Since your
> applet probably
> doesn't send back cookies, it will always look like cookies are not
> enabled, and so the
> right thing should happen.
> 
> - Fernando
> 
> 
> 
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <" 
> target="l">http://java.apache.org/faq/>WHEN YOU POST, include all 
> relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
> 
> I have experienced a problem with sessions as I wrote, but isn't there
> anybody who lived such a problem, common guys...
> 
> the copy of original message is as below:
> 
> > >Hi,
> > >
> > >Server version: Apache/1.3.12 (Unix) (Red Hat/Linux)
> > > ApacheJServ-1.1.2
> > > gnujsp-1.0.1
> > >
> > >I am using a servlet that loads an applet into browser and makes
> > >authentication and then send a URL (an html frame that has a JSP
> > page)>to applet and then applet load that address by
> > showDocument() method.
> > >Communication between applet and servlet is by URLConnection 
> sockets.> >
> > >Before servlet sends the new page's URL to the applet, servlet 
> stores> >some objects into session. But new page (JSP page) has 
> different> >session, so I cannot get the objects that I have put into
> > session.
> > >
> > >Why Apache (or somethingelse) creates new session while showing new
> > >page. How can I prevent from creating new session? or is there any
> > >configuration issues for this.
> > >
> > >Note:
> > >I have run these pages (servlet and jsp and storing objects into
> > session
> > >and got them) by JavaWeb Server, and it works, but the same codes
> > do
> > not
> > >work with Apache, it creates new session while loading JSP. I 
> can see
> > >the session ids, servlet's is seen because a parameter to applet,
> > and I
> > >also print the JSP's session id, they are different.
> > >
> > >Deniz Demir.
> > >
> > >
> > >
> 
> 
> 
> Regards,
> deniz Demir
> 
> 
> 
> 
> 
> --
> --------------------------------------------------------------
> Please read the FAQ! <" target="l">http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search Archives:
> <" target="l">http://www.mail-archive.com/java-apache-
> users%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> 
> --
> --------------------------------------------------------------
> Please read the FAQ! <" target="l">http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search Archives: 
> <" target="l">http://www.mail-archive.com/java-apache-
> users%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
> 
> 



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to