Friday 18 July 2014

HttpServletRequest

HttpServletRequest is an interface which extends ServletRequest. The servlet container creates an HttpServletRequest object and passes it as an argument to the servlet's service methods (doGet, doPost, etc).

public interface HttpServletRequest extends ServletRequest {
 String getAuthType();
 Cookie[] getCookies();
 long getDateHeader(String name);
 String getHeader(String name);
 Enumeration<String> getHeaders(String name);
 Enumeration<String> getHeaderNames();
 int getIntHeader(String name);
 String getMethod();
 String getPathInfo();
 String getPathTranslated();
 String getContextPath();
 String getQueryString();
 String getRemoteUser();
 boolean isUserInRole(String role);
 Principal getUserPrincipal();
 String getRequestedSessionId();
 String getRequestURI();
 StringBuffer getRequestURL();
 String getServletPath();
 HttpSession getSession(boolean create);
 HttpSession getSession();
 String changeSessionId();
 boolean isRequestedSessionIdValid();
 boolean isRequestedSessionIdFromCookie();
 boolean isRequestedSessionIdFromURL();
 boolean isRequestedSessionIdFromUrl();
 boolean authenticate(HttpServletResponse response) throws IOException, ServletException;
 void login(String username, String password) throws ServletException;
 void logout() throws ServletException;
 Collection<Part> getParts() throws IOException, ServletException;
 Part getPart(String name) throws IOException, ServletException;
 <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException;
}


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment