相关文章推荐
深沉的便当  ·  GitHub | DevOps ...·  5 月前    · 
绅士的竹笋  ·  海悅聯名卡·  1 年前    · 
阳刚的烤地瓜  ·  Parsing dates in ...·  1 年前    · 
刚毅的酱牛肉  ·  java bufferedwriter ...·  1 年前    · 

JAVA 后台重定向跨域发送post请求

如例子:

@RequestMapping(value = "test.do", method = RequestMethod.POST)
public void Test(HttpServletRequest request, HttpServletResponse response) {
    Map<String, String[]> mPara = request.getParameterMap();
    String sPara = "";
if(mPara != null){
for (String sKey: mPara.keySet()) {
if(sPara.equals("")){
                sPara += sKey + "=" + mPara.get(sKey)[0];
            }else {
                sPara += "&" + sKey + "=" + mPara.get(sKey)[0];