开发者

How to Overwrite Spring Security Login Logout Files

开发者 https://www.devze.com 2023-04-03 06:09 出处:网络
How开发者_StackOverflow中文版 can I overwrite default login logout pages of Spring Security. I will put my own login.html and logout.html files and don\'t use jsp files just works with static contents

How开发者_StackOverflow中文版 can I overwrite default login logout pages of Spring Security. I will put my own login.html and logout.html files and don't use jsp files just works with static contents at that side.


Specify them in your security-context.xml (or whatever you've called yours) like this:

<form-login login-page="/login.htm" authentication-failure-url="/login.htm?login_error=1" default-target-url="/home/index.htm" />

But I think you'll find it difficult to write a login page that works with Spring Security and doesn't use JSP.

Here's an example JSP page you can start from: http://loianegroner.com/2010/01/spring-security-login-and-logout-form-jsp/

0

精彩评论

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