Spring Security with Wicket – customized JSP form-based database authentication
The previous two recipes were to test the compatibility of Wicket with Spring Security. It also demonstrates how easy it is to integrate spring with Wicket. We learned from our two Wicket recipes that we can easily use Spring-basic and Spring-form-based authentication with a database and the same can be extended to LDAP as well.
In this recipe we are going to add a customized JSP form. We expect the Wicket application to call our JSP form for login. If the developer doesn't want to create a Wicket form, they can use this approach. This approach also holds good for GWT and Vaadin.
You also need to give anonymous access to the login page.
Getting ready
Create a Maven Wicket project:
spring-security-wicket_customized_jsp
.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...