今天使用HttpURLConnection发送请求时出现 Server returned HTTP response code: 500 for URL的异常
url:http://localhost:8080/web/users/userModifyAction!webPageRegister.action?detail=Web page
纠结了半天发detail的值中间有个空格。
解决方法是:将detail 通过URLEncoder.encode(detail, "UTF-8");进行转换