hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Deschamps.Francoi...@hydro.qc.ca>
Subject Loosing my HttpSession between Applet and Servlet
Date Tue, 23 Mar 2010 21:57:50 GMT
Hi,
 
I'am using HttpClient 4.0.1.
 
Each time my applet make a get or post to the servlet, I am loosing my httpSession on the
back end.
 
How can we keep the httpSession alive with HttpClient ?
 
Here's the call that I made from my applet, each time it is call, i get a new httpSession
from my servlet :
 
public static void getHttp(TestHttpSession applet) {

try {

HttpClient clientHttp = new DefaultHttpClient();

HttpResponse response = clientHttp.execute(httpGet);

HttpGet httpGet = new HttpGet(applet.getURL());

clientHttp.getConnectionManager().shutdown(); 

} catch (Exception e) {

e.printStackTrace();

}

}

Thanks,
Frank
 
 
François Deschamps
Conseiller en TI,
Centre d'expertise Java (DMDI)
Hydro-Québec
tel: 514-840-3000 (4756)
courriel: deschamps.francois.2@hydro.qc.ca <mailto:deschamps.francois.2@hydro.qc.ca>

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message