I write a website on spring. Do I do the logic and work I have to do:
To authorize a user makes a filter cap on the page will be posting on the principle that if the user is authorized, then one cap if not authorized, then another. Depending on which write filter.
Each page will have its own class, with your session depending on the content of the page
When moving from one page to another the session is reset
Implement what you describe is possible, but that is absolutely the wrong approach.
Authorization and authentication is best implemented using Spring Security. Also conjuring a sessions makes no sense - Spring WebMVC does it all. If you need some more fine-tuning, session management, it is possible to scratch the Spring Session (which is needed in 0.001% of cases).
Before we implement their own, read the documentation, as the vast majority of tasks and problems already solved by standard means.