private SessionState sessionRead(String cookie_vals, HttpServletRequest req){
    	SessionState state = null;
    	
    	String[] sTemp = cookie_vals.split("\\^");
    	String sID = sTemp[0];
    	int ver = Integer.parseInt(sTemp[1]);
    	String ipP = sTemp[2].split(":")[0];
    	int portP = Integer.parseInt(sTemp[2].split(":")[1]);
    	String ipB = sTemp[3].split(":")[0];
    	int portB = Integer.parseInt(sTemp[3].split(":")[1]);
    	
    	if(!ipP.equals(IP_NULL)){
    		try {
				state = RPCClient.sessionRead(sID, ver, new Server(InetAddress.getByName(ipP), portP));
			} catch (UnknownHostException e) {
				System.out.println("Primary IP could not be resolved");
				e.printStackTrace();
			}
    		if(state == null && !ipB.equals(IP_NULL)){
    			try {
					state = RPCClient.sessionRead(sID,  ver, new Server(InetAddress.getByName(ipB), portB));
					if(state != null){
						req.setAttribute("found", "IPPBackup");
					}
				} catch (UnknownHostException e) {
					System.out.println("Secondary IP could not be resolved");
					e.printStackTrace();
				}
    		} else {
    			req.setAttribute("found", "IPPPrimary");
    		}
    	} if(state == null){
    		System.out.println("State not retrieved");
    	}
    	return state;
    }