开发者

jquery $.getJSON, retrieving servlet parameters upon process method

Is this the correct way to set parameters upon a servlet request (tags, tagmode, format)?

$.getJSON('....Servlet',
            {
              tags: "cat",
              tagmode: "any",
              format: "json"        
            }, function(data) {
});

And can I retrieve the parameters like this (Servlet class ext开发者_运维百科ending HttpServlet | inside process method)?

request.getParameter("tags");
request.getParameter("tagmode");
request.getParameter("format");

I haven't found the right terms to search google or stackoverflow. So if anyone has a proper answer or documentation to this issue, then just let me know.


Yes, that should be all correct. And BTW, you could have answered your own question if you had just written the code and tried it. ;o)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜