this blog is original: Integrated still Silicon Valley (http://www.atguigu.com) System tutorial (deep thank) and network of existing resources (blogs, documents, books, etc.), the source of resources I will markThe purpose of this blog: ① summary of their own learning process, equivalent to study notes ② to share their own experience to everyone, learn from each other, communication, not commercialcontent inevitably appear problems, welcome to correct, exchange, discussion, you can leave a message, can also be contacted by the following ways. I Internet technology enthusiasts, Internet technology enthusiastsWeibo: Ivan is in 0221qq:951226918
--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- -----------------------------
1. Introduction
1) The Servletresponse interface class defined in the Servlet API is used to Create a response message
2)HttpServletResponse is a servletresponse subinterface that is dedicated to the HTTP protocol, and it is used to encapsulate HTTP response messages
Introduction to 2.ServletResponse Common methods
1) java.io.PrintWriter getwriter(): Returns a PrintWriter object, invokes the print () method of the pair, and prints the parameters in print () to the browser
2) void setcontenttype(java.lang.String type): sets the corresponding internal type
3)Servletoutputstream getoutputstream(): Gets a stream that is important when the file is downloaded
4) void SetLocale(Java.util.Locale Loc): Set up regional information, internationalization
Introduction to 3.HttpServletResponse Common methods
1) void sendredirect(java.lang.String location): Request redirect
[Original]java Web learning Note 08:servletresponse & HttpServletResponse