The Request object is a built-in JSP object used to process the forms sent from the client browser.
# Note: jsp to get the submitted form of Chinese characters may have encoding problems, you can first get the garbled string into a ISO-8859-1 byte array, and then re-combine into a string:
String word = request. getParameter ("word ");
Byte B [] = word. getBytes ("ISO-8859-1 ")
Word = new String (B );
Request Method:
1, getParameter (String strTextName): Get the information in the submission form, such as: String word = request. getParameter ("word ");
2. getProtocol (): Obtain the protocol used by the client, for example, String strProtocol = request. getProtocal ();
3. getServletPath (): page for obtaining information submitted by the customer, for example, String strServlet = request. getServletPath ();
4. getMethod (): Obtain the client's submission information.
5. getHeader (): obtains the values of accept, accept-encoding, and Host in the HTTP header file of the client, for example, String strHead = request. getHeader ("accept ");
6. getRemoteAddr (): obtains the Client IP address.
7. getRemoteHost (): Get the client host name
8, getServerName (): Get the server name
9. getParameterNames (): obtains the names of all parameters submitted by the client, for example:
Enumeration enum = request. getParameterNames (); whilr (enum. hasMoreElements () {String s = (String) wnum. nextElement (); System. out. println (l );}