how to redirect the user to login page spring mvc? -


i new spring mvc. have web application redirect user login page when clicks button in html page, when logs in, send him link had clicked.i added class called myaccessdeniedhandler configuration package didn't know .

yes kenny tai huynh tried 1 :

@component("myaccessdeniedhandler") public class myaccessdeniedhandler implements accessdeniedhandler {      //@qualifier("myrequestcache")     //private requestcache myrequestcache;      public myaccessdeniedhandler() {     }        @override     public void handle(httpservletrequest arg0, httpservletresponse arg1,             org.springframework.security.access.accessdeniedexception arg2) throws ioexception, servletexception {         // todo auto-generated method stub         if (!arg1.iscommitted()) {             arg0.getrequestdispatcher("/signin").forward(arg0, arg1);         }     }   } 

Comments

Popular posts from this blog

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -

angular - DownloadURL return null in below code -