Short tip: Getting the protocol name from a request in a servlet
This is a very simple and little function that gets the name of the protocol used when accessing the servlet. Great if you want to construct a URL… /** * Returns the protocol name (http/https etc) *that the request was made with. * * @author Johan Känngård, http://dev.kanngard.net * @param request the request that should […]