AW: Dynamic page assembly - role based. Help!
"Bernhard Woehrlin" <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Ashish, using StrutsCX with role-based authentication should be very much possible. This is basically the same like in Struts. Looks like you already use one of the authentication methods the servlet specification mentions (Basic, Digest, Form, Client-cert). With StrutsCX - like with Struts - you do have in general two options 1. Secure whole links through setting security-constraints in the web.xml 2. Secure parts of your code through retrieving authentication information (getRemoteUser(), getUserPrincipal()) You could solve your problem by retrieving the user's authentication information in one of your StrutsCX Action classes. I.e., depending on this data, put a flag (or like you consider - a JDOM tree) to your HttpServletRequest or HttpSession - which automatically will get serialized in the StrutsCX-Output-Document. In your XSL Stylesheet use this flag to change the design of the GUI/ to redirect to another template (<xsl:if select="//session/myflag = 'true'">... or <xsl:choos><xsl:when select"//session/myflag = 'true'">...). Hope this answers your question. Regards, Berny -----Ursprungliche Nachricht----- Von: [email protected] [mailto:[email protected]]Im Auftrag von Ashish Sahu Gesendet: Donnerstag, 10. Juli 2003 04:11 An: [email protected] Betreff: [Strutscx-user] Dynamic page assembly - role based. Help! Hi We are evaluating strutscx for our web application framework and are extremely impressed by the framework and flexibility offered. However, there are some problems we are facing specific to our application: We have a tiered adminstration web-application. A user logs in and is presented menu-items based on his role. 1) How does strutsCX handle permission-based UI construction. 2) Navigation Menu - we have a menu bar residing on the left-hand side of the page. This needs to be constructed only once after user login, however this menu needs to be displayed for all the pages during a user session. We want to avoid having to reconstruct the navigation menu bar for each request. Presently, we are planning to add the Navigation Menu JDOM structure to the session and apply xsl to both the VOs and Session data. Any suggestion? Ashish Sahu Software Engineer Zonelabs Inc. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps