This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13857|Reply: 0

[JavaEE] JSP has built-in object response common methods

[Copy link]
Posted on 12/11/2014 9:36:03 PM | | |
Method description
void addCookie adds a specified cookie to the response object
void addDateHeader(String name, long date) Adds the specified name and long type values to the header
void addHeader(String name, String value) Adds the specified name and String type values to the header
void addIntHeader(String name, int value) Adds the specified name and int type values to the header
void setDateHeader(String name, long date) sets the header with the specified name and long type values
void setHeader(String name, String value) Sets the header with the specified name and String type values
void setIntHeader(String name, int value) sets the header with the specified name and int type values
void sendError(int sc) sends a defined status code to the client
void sendError(int sc, string msg) sends a defined status code and error message to the client
void setStatus(int sc) sets the status code of the response
       
String encodeURL(String url) Overrides the specified URL, including the session ID
String encodeRedirectURL(String url) Rewrites URLs that use the sendRedirect( ) method





Previous:JSP has a common method of building object requests
Next:WIN7 is streamlined, dedicated to friends who like manual streamlining
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com