开发者

Spring security redirect user to another page if access is denied but does not change url

开发者 https://www.devze.com 2023-04-04 23:11 出处:网络
I have a problem with my spring xml configuration file. When user does not have a necessary role and enters forbitten url they are redirected to page /timereport/home.do as expected, but url remains a

I have a problem with my spring xml configuration file. When user does not have a necessary role and enters forbitten url they are redirected to page /timereport/home.do as expected, but url remains as the user entered it, it is not /timereport/home.do. I do not want to write a custom filter to do this, how can I cope with it?

The necessary lines from the configuration file are below:

<http access-denied-page="/timereport/home.do"
  access-decision-manager-ref="accessDecisionManager">

  <form-login login-page="/loginFor开发者_JAVA技巧m.jsp" default-target-url="/timereport/home.do" etc.

Thanks in advance!

0

精彩评论

暂无评论...
验证码 换一张
取 消