Persistent cookies from a servlet in IE

前端 未结 6 1730
故里飘歌
故里飘歌 2020-12-10 07:23

I have a cookie which is generated from a servlet and that I would like to be persistent - that is, set the cookie, close down IE, start it back up, and still be able to re

6条回答
  •  青春惊慌失措
    2020-12-10 08:07

     try{
            encodedString = URLEncoder.encode(s, "UTF-8");
        } catch (UnsupportedEncodingException e) {}
    
        return encodedString;`a`
    }
    public static String decodeString(String s) {
        String decodedString = s;
    
        try{
            decodedString = URLDecoder.decode(s, "UTF-8");
        } catch (UnsupportedEncodingException e) {}
    
        return decodedString;
    }
    

提交回复
热议问题