I am making a servlet that is not meant to be used by browsers, it will be used by an java application that will use https requests to it.
So far I've managed to follow http://docs.spring.io/spring-security/site/docs/current/guides/html5//helloworld.html. If I attempt to access http://localhost:8080/myservlet/MainServletClass, it will redirect me to http://localhost:8080/myservlet/login as expected, but I don't get how I am supposed to use the methods from http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html to logout