Running the application

Run the application just like any other Spring Boot project by executing the following command:

mvn spring-boot:run

Go to a browser and navigate to http://localhost:8080 and you will be presented with a login page, as shown here:

Figure 15: Login page

As shown in the preceding screenshot, enter the username/password and click on the Login button, and you will be navigated to the home page:

Figure 16: The home page, which is presented to the user after successful login

Click on the link to navigate to the page where you can create a new movie. You will be navigated to the page shown in the following screenshot. Look closely at the URL and you will see a new query parameter has been added, _HDIV_STATE_. The server validates and ensures that the submitted form is genuine by looking at that value:

Figure 17: The Create Movie screen, showing off the _HDIV_STATE_ query string

Now go back to the home page and click on the links page. You will be navigated to the following page:

Figure 18: The links page, showing the _HDIV_STATE_ query string

As stated in the page, try manipulating the link (change the _HDIV_STATE_ value) and you will be taken to the HDIV error page:

Figure 19: The HDIV error page, which displays in the case of error conditions

This example showcases just two of the cases where HDIV shows its worth when working alongside Spring Security. For more details, I urge you to look at the HDIV website and documentation, which is available here:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.196.103