1、怎样接受http请求所传递的特殊字符。首先,必须对特殊字符转换,使用URLEncoder.encode("EKIDAO/SDE%KD@f+^", "UTF-8")。
例如:http://localhost:8088/uc/LoginAction.do?method=closeMeeting&password="EKIDAO/SDE%KD@f+^"请求中传递了特殊字符,把特许字符经过转换后在传递,那么就可以成功传递特殊字符。
转换后: http://localhost:8088/uc/LoginAction.do?method=closeMeeting&password="EKIDAO%2FSDE%25KD%40f%2B%5E"
例如:http://localhost:8088/uc/LoginAction.do?method=closeMeeting&password="EKIDAO/SDE%KD@f+^"请求中传递了特殊字符,把特许字符经过转换后在传递,那么就可以成功传递特殊字符。
转换后: http://localhost:8088/uc/LoginAction.do?method=closeMeeting&password="EKIDAO%2FSDE%25KD%40f%2B%5E"