JQuery的 - $就POST不发送.DATA到Web服务器 [英] JQuery - $.ajax POST does not send .data to web server

查看:110
本文介绍了JQuery的 - $就POST不发送.DATA到Web服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jQuery $就post命令到我的Web服务器上调用Ajax事件:

I am using the JQuery $.ajax post command to invoke an ajax event on my web server:

var formParams = "fe1=y&fe2=m&fe3=m";

$.ajax({
    type: 'POST',
    url: '/foo.jsp',
    async: false,
    data: formParams,
    complete: function(xmlRequestObject, successString){
        ymmReceiveAjaxResponse(xmlRequestObject, successString);
    }
});

Ajax组件成功调用该网页,但它不包含任何的POST数据。
即 - (HttpServletRequest的)request.getParameterMap.size()== 0 - 我期望3,但我得到零

The ajax component successfully calls the web page, but it does not include any of the post data.
ie - "(HttpServletRequest) request.getParameterMap.size() == 0" - I'd expect 3, but am getting zero.

改变从POST上面的命令,一个GET使一切工作就好了。

Changing the above command from POST to a GET makes everything work just fine.

TIA

推荐答案

该问题的原因是使用萤火虫和开开网小工具中。

The cause of the problem was found using FireBug and opening the opening the Net gadget.

我看到了Web服务器响应与调用网页状态302。

I'm seeing that the web server is responding with a status 302 on the call to the web page.

在扩大在Firebug /网络302的请求,并检查参数,头,响应和HTML很快发现,这是一个应用程序特定问题发起的服务器上。

Expanding upon the 302 request in Firebug/Net, and examining the Params, Headers, Response, and HTML quickly identified that it was an application specific issue originating on the server.

感谢大家的反馈意见

这篇关于JQuery的 - $就POST不发送.DATA到Web服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆