good day,

I am creating an applet that is talking to a servlet and I am having
problems maintaining session.

The servlet returns two types of data, one is an Image, and the other is
a String.  To retrieve the Image, I us the applets getImage() method.
The image I receive is different depending on the get parameters.  Each
time I use getImage, the session is maintained.

The problem lies when asking the servlet to return a string.  There is
no nice getString method in the Applet class so I have to do this manually:

  try {
       System.out.println("sending string in getEnv"+sb.toString());
//the url looks good
     URL envurl=new URL(sb.toString());
     BufferedReader bin = new BufferedReader(new
InputStreamReader(envurl.openStream()));


     String line;
     while( (line = bin.readLine()) !=null){
       retsb.append(line); //retsb is a StringBuffer
       }
     }catch (MalformedURLException mue){
       System.err.println("bad url or something"+mue);
     }catch (IOException e){
       System.err.println("error in GetEnvelope" + e.toString());
     }


Each time I do this call, a new session is created.

Any ideas on what is going on and what I should do to get around this
besides url rewriting.

thanks,
-Trav

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to