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)
精彩评论