How in Java Web application to restrict direct access to secure pages for not admins roles? For example I have in my application 350-500 URLs and I want to hide 20-30 of them and permit access to them only for admin role. What is best way to solve this problem? What is best practice for this case?
May be I need group necessary URLs by single beginning URI? Or somehow using web.xml
properties? Or it is enough using saving role of logged user in session and using servlet filter? Problem in that case is I need sort out each secure URL. But there may be many in future...
I think all are facing this problem. Give me the standard and simple solutions of this situation please! Thanks in advance!
I will be grateful for any advices and tips!