我将参数传递给服务器行
"login=testAva4&nick=testAvaNick&social=vk&saurl=http://domain.example?param1=1¶m2=2¶m3=3&maurl=1"
等待值 saurl="http://domain.example?param1=1¶m2=2¶m3=3"
但我得到http://domain.example?param1=1和 param2=2 param3=3
从 Eclipse 调试
req->_parameters
{maurl=1, nick=testAvaNick, param2=2, saurl=http://domain.example?param1=1, param3=3, social=vk, login=testAva4}
获取代码中的参数如下:
public class AddProfileServlet extends PlacerServlet {
//Add new profile method
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
//Receive variables from URL
String login = req.getParameter("login");
String nick = req.getParameter("nick");
String social = req.getParameter("social");
String saurl = req.getParameter("saurl");