Spring Security with Wicket – Spring form-based database authentication
In our previous recipe we found the Wicket 6.9 is very much compatible with Spring Security and it was very easy to integrate. All we did was to add spring dependency and we configured the applicationContext.xml
file.
In this section we shall use the Spring form to do authentication. We expect the Spring form to show up in place of the dialog box and do the authentication for us.
Getting ready
Create a Maven Wicket project:
spring-security-wicket_springform
.Update the
pom.xml
file with Spring dependency.Create an
applicationContext.xml
file. It's mandatory to name it asapplicationContext
or else we will get error messages in the console.Edit the
web.xml
with Spring listeners.Create a database
details.xml
file and add the database details.Add the file as a context parameter to the Spring listener.
How to do it...
Edit the applicationContext.xml
file using the following code:
<global-method-security pre-post-annotations...