in your action class, create a collection of objects that the current user 
is allowed to access based upon his/her application permissions.  i would 
envision the class of the collection member containing at least:

String targetUrl;
String linkText;

and anything else that's relevant to your navigation menu.  set that object 
as a session-scoped bean and iterate through it from your navigation jsp.

alternatively, a better place for this collection is in a user profile 
object, which you could create on login to your application.  put a 
reference to the collection inside your user profile object, set the user 
profile as a session scoped bean, then expose the collection to the jsp and 
iterate through it using the iterate tag.

jon


----Original Message Follows----
From: "Alex Colic" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "Struts" <[EMAIL PROTECTED]>
Subject: Re: A bit of design help please?
Date: Thu, 16 Aug 2001 10:27:23 -0400

Hi,

Thanks for the reply. Just a bit of elaboration.

What I should do is have a simple login page. No problem. On successful
login I send them to a framed page. So far so good.

Question about this dynamic links. Could you elaborate on how to create them
using struts?

Alex


----------------------------------------------------------------------------
----------------------
Date: Thu, 16 Aug 2001 09:37:04 -0400
To: [EMAIL PROTECTED]
From: "Jon Crater" <[EMAIL PROTECTED]>
Subject: Re: A bit of design help please?
Message-ID: <[EMAIL PROTECTED]>

alex--

i think the best way to do this is not to have the frameset appear until
after a successful login.  obviously, you don't want the links to your
functional areas to appear until after the user has been authenticated.  so
throw up a non-framed page which contains your login form.  after
authenticating the user, forward to your frameset, where you can dynamically
build navigation links in the navigation frame based on permissions, etc,
and where you can prepopulate the content pane with a default page until the
user selects a link.  targeting the content pane from the link is simple
HTML (<a href="/SomeAction.do" target="content">link text</a>).  your
forward should then go to the content pane, where your output is displayed.

when the session dies or the user logs out, simply forward him/her to the
login page or some other non-framed page.

hope this helps...



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply via email to