AW: Dynamic page assembly - role based. Help!
"Kossler, Paul S." <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, I am currently using StrutsCX in a Role based environment. I have leveraged the three main methods of role based development. 1: The web.xml is set to control role-permissions 2: The policy file locks all files accept where explicitly allowed 3: Use class code to getRemoteUser and getPrinciple While these are all great to use, none of them work until you know what the Role/User/Principle are. So: Use a ServletFilter to catch all transactions and get & verify the user authenticity. This way you can write your authcode once and then set the filter chain in the web.xml to filter all requests for the application :) If you are in a non-single signon environment, then you can have the user login and authenticate then pass the objectId of the authenticaiton|principle as a JDOM element to be transformed into a hidden form element. (note encrypt the ID with some sequencer each time so people can not acquire the objectId in a simple pass, even though the objectId will only be good for the session) Your navigation menu problem can be handled in several ways: Quick and easy: Create and transform it seperately from the the StrutsCX two stage xml tranformation(Fowler:PEAA), then use a Servlet2.0 Filter to add it to the response just before sending it to the requester. (hint: use a $NavigationPlaceHolder variable and replace it with a string...) Paul S. Kossler Sr.Software Engineer CACI Chesapeake
Kossler, Paul S..vcf
(application/octet-stream, 384 B) - not displayed