permaculture playing cards*
The moose likes JSP and the fly likes disable the links in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "disable the links in jsp page" Watch "disable the links in jsp page" New topic
Author

disable the links in jsp page

smyle khanna
Ranch Hand

Joined: Jan 14, 2004
Posts: 54
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
C. P. Chouksey Raisen
Greenhorn

Joined: Feb 20, 2004
Posts: 2
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.


CP Chouksey<br />Raisen (MP) India<br />Mobile- +91-98452-39250.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
That or you could simply use standard J2EE constructs like HttpRequest.isUserInRole().

Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
smyle khanna
Ranch Hand

Joined: Jan 14, 2004
Posts: 54
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: disable the links in jsp page
 
Similar Threads
user authentication
Problem with dynamically generated menu.
Role Based Menu in a JSP Page.
Frames problem
Session Management Question