Hi Folks,

In my appfuse application, i have a home page that a user sees before going
to the login page. Basically, i am required to add a link on the home page
menu that directs to the login page. All the other links on the home page
menu are also available upon login. But i need to implement the login menu
item in such a way that it is available when a user first visits the home
page and after a user logs in, it should disappear.

I am having problems implementing this as i have added the following in
menu-config.xml:

<Menu name="Login" title="menu.login" description="Login" page="/login.jsp"
roles="ROLE_ANONYMOUS"/>

But the login menu never appears. If i remove the roles attribute, then the
menu appears even after login. I suspect its because, struts menu does
request.isUserInRole() to check if user has required role but then at this
point user is not logged in so the method call returns false.

I have also added the following in security.xml:

<anonymous granted-authority="ROLE_ANONYMOUS"/>

but this dosent seem to have solved the problem. Has anybody ever
encountered this? Is there a way i can get Struts menu to also check for
annoymous users?

Any help would be appreciated.

Thanks.

Reply via email to