HttpServletResponse There are many constants representing the state? 404 1, Response line http/1.1 oksetstatus (int sc) Set response status code (200) 2, response header Sendredirect (String lo cation)//Request redirect SetHeader (string name, string value)//Set the response header information//tell the browser what code table to use Response.setheader ("Content-type", "text/h Tml;charset=utf-8 "); Tell the client not to cache Response.setheader ("Pragma", "no-cache"); Response.setheader ("Cache-control", "No-cache"); Response.setdateheader ("Expires", 0); Referesh Refresh 3, Response body (body) etwrite (); Character output stream Getoutputstream (); BYTE output stream setcharacterencoding (string charset) tells the server what encoding to use setContentType (string type)
16. Request HttpServletRequest and Response httpservletresponce