Request Parameters & Retributes

xiaoxiao2021-03-06  72

1. Both are in the HTTPServletRequest object.

2, Request parameters is inserted into the HTTPServletRequest object through the parameters in the URL statement (/ logon? Action = create) and the POST method; get it by httpservletRequest.getParameter (String strparaname); the purpose is to get the client on the server side data.

3, Request attributes by setAttribute (String name, Object obj) method inserted into HttpServletRequest object; obtained by HttpServletRequest.getAttribute (String name); purpose is to allow an object within a certain range (request, session or applicatioin) Other servlets (such as JSP pages) are used.

The above is my own point of view, and I don't know if it is correct, I hope criticism is correct.

转载请注明原文地址:https://www.9cbs.com/read-120484.html

New Post(0)