getProtocol() Method Example

getProtocol() method is defined in ServletRequest interface from javax.servlet package and inherited by HttpServletRequest. With getProtocol() method, the Servlet Programmer can know what protocol (like HTTP/1.0 or HTTP/1.1) is used by the client from HTML file to call the Servlet. Let us see what Java API says about this method. java.lang.String getProtocol(): Returns the name …

getProtocol() Method Example Read More »