============ Problem Description ============
Little brother is doing a client shopping cart function, to get to the server session saved in the shopping cart list, uploaded SessionID but still can not get to the shopping cart, the code is below:
String urlstring = "Http://192.168.1.128:8080/Pinzhuo04/servlet/ShowCartServlet";
HttpURLConnection httpurlconnection = (httpurlconnection) New URL (
urlstring). OpenConnection ();
Httpurlconnection.setrequestproperty ("Cookie", SessionID);
Httpurlconnection.setconnecttimeout (5000);
Httpurlconnection.setrequestmethod ("POST");
if (Httpurlconnection.getresponsecode ()! =-1) {
InputStream InputStream = Httpurlconnection.getinputstream ();
Return Xmlparse (InputStream);
}
============ Solution 1============
http://blog.csdn.net/chindroid/article/details/7556363
How the Android client (non-browser) keeps a synchronization session with the server session