On 29/08/2015 22:16, Sreyan Chakravarty wrote: > Okay this is my first try at container based authentication using Realms in > Tomcat. And things have gone wrong. Here is my login page -:
<snip/> > My web.xml security configuration is -: > > <security-constraint> > <web-resource-collection> > <web-resource-name>TECHERS</web-resource-name> > <url-pattern>/teacher/success.jsp</url-pattern> > <http-method>GET</http-method> > <http-method>POST</http-method> > </web-resource-collection> Remove the methods. By enumerating methods ONLY those methods are protected. PUT, HEAD, DELETE, etc. aould all be permitted. <snip/> > Now when I click on submit I get the following error page in Tomcat -: > > > *HTTP Status 400 - Invalid direct reference to form login page* > > *message* *Invalid direct reference to form login page* > > *description* *The request sent by the client was syntactically incorrect.* > > > Why is this happening ? Any help would be greatly appreciated. Because you requested the login page directly. You need to request the protected page and Tomcat will handle the redirects. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org