Role based Spring security
If you need Spring jsp page authorization means follow the below steps,
Step 1: Need to activate web authorization in web security file
ex:
<http .... use-expressions="true">
then you configure pom.xml for download spring
Step2. Then add the tag lib in your need jsp page
Ex:
Step3: Then check the hasRole in jsp page
Ex:
In that place userRole is case sensitive
You can also provide the full page access based on role.. use follow sample code
This intercept allow role user in that page.
Based on in you question you should verify web security file must have
use-expression="true"
If it is correct please make sure the role name.Because it is case sensitive
|
Comments
Post a Comment