• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

disable the links in jsp page

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi....
i have 2 jsp pages..one is the login page n other main page which is displayed after the login page.this main page contains menu coded in javascript n dhtml.
the user are divided into several groups and depending on the type of the group of user ,certain menu links in the main page must be disabled.
how can i disable or prevent the user from access certain links in the menu for which he has no permission?
plz help me out
thanks in advance
Smyle
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
during creating UserID, u add any prefix or suffix string which show u an identity of a particular group. Store this user id into session when login, and on the click event of ur menu
u just check that substring (prefix or suffix string which u added during userID creation).
execute ur operation if this match with ur group, nothing otherwise.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That or you could simply use standard J2EE constructs like HttpRequest.isUserInRole().

Kyle
 
smyle khanna
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...
thanks a lot 4 the responses
the UserGroup id i have passed using a session...but i dont know how exactly to disable or restrict the user of the particular group from access the menu links....
i cant use seperate menu for each group since the number of groups are more,so in the main page according to the group rights the links must be enabled or disabled or provide sum alert or sumthing which prevents the user from accessing it.
,overall the user group not having rights must not b allowed to access tht menu links........
plz help me outta this...it wuld b more helpful if i get guidelink
thanks in advance
Smyle
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic