barbie amr

+ Follow
since Mar 30, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by barbie amr

Hi all,

I have a doubt in JDBC.
Suppose i load more than 1 driver in the connection say
Class.forName("some other dirver)
and if i say
Connection con = DriverManager.getConnection(the driver)
Which driver will the application take, is it the one specified in the connection object. If so what will happen to other drivers.
Do let me know at the earliest

thanks and regards


I am presently working on a project. I just wanna help from u.

1. After the login page, we have to come to main page. In this page based on the user (login user), some restrictions are provided. I dont want the user to enter into that module if he/she is not provided the right for that module. So in the main page itself, based on the user, only those modules which he is given right to access should be enabled and the rest all should be disabled. Can anybody help me with code for such a type of situation.
2. In main page I have different menus (coolbar menus), based on the user when i click on that paricular menu he should be either allowed to go into that module or an alert should be displayed saying he is given rights to access the module.

The menu is created like this.....

oCMenu.makeMenu('top2','',' UserGroupMaster','/default.html')
oCMenu.makeMenu('sub21','top2','Add UserGroup','User_GroupCreate.jsp?param=add')
//oCMenu.makeMenu('sub210','sub21','New tutorials','/tutorials/index.asp')
//oCMenu.makeMenu('sub211','sub21','Tutorials archive','/tutorials/archive.asp')
oCMenu.makeMenu('sub22','top2','Edit UserGroup','User_GroupCreate1.jsp?param=edit')
//oCMenu.makeMenu('sub220','sub22','New articles','/articles/index.asp?show=new')
//oCMenu.makeMenu('sub221','sub22','Article archive','/articles/archive.asp')
oCMenu.makeMenu('sub23','top2','Delete UserGroup','User_GroupCreate1.jsp?param=delete')

Here itself based on the rights assigned to the user, he should be either allowed or not allowed to enter that module.
For eg.. frm above code, For usergroup master module, that particular user is not allowed to add a new group but is allowed to edit or delete the group. How and where do i check this condition? Could anybody tell me as to go abt this, Or is there any other way to handle such a situation
18 years ago
Hi Welsh,
I am able to trap the checked items in the servlet. Thanks a lot. Now how do i save these into the database. As i have already said i have 5 rows and each row has 3 columns with 1 check box in each column. Suppose the user clicks 1st row 2nd col, 2nd row 3rd adn 4th column, 5th row 1st, 2nd & 3rd columns. In the database also the rows stands for rows and 3 columns stands fr columns (fields). Can anyone advice me as to how to achieve at this. I want to store in the database as 1 fr check boxes clicked and in all other cases as 0.
In the database i want a format like this
GrpName Moduleid aR eR dR
S1 M1 1 0 0
S1 M2 0 1 1
S1 M3 1 1 1
S2 M1 0 0 1
S2 M2 1 0 1
S2 M3 1 0 1
wherein ar, er, dr stands for colums as check boxes. When it is checked, 1 is stored otherwise 0. How od i write insert query fr that?
18 years ago
I am new to JSP, Servlets, JavaScript. I am presently doing a project in JSP + servlets. I need help. In my jSP form i have 1 text box and 18 check boxes, a save button. I enter a group name in text box and click some check boxes. WHen i click on save button i want the groupname along with the check box values to be saved in the database(oracle).
i.e., There are some modules and each module has add, edit and delete checkboxes. I need to give permissions based on the group, say for eg. there is a module called user master, the administrator group is allowed to add, edit and delete but the user group is allowed only to add. hence only add check box of user master is to be clicked. When the user clicks on the save button, the group name, the module name and the module's rights are to be saved in databse.
THe database table consits of the following fields - groupname, module name, addright, editright, delright.
can anyone help me in this regard
thanx and sorry for such a huge messae
Thanks for ur reply,
I need to tell u one more thing, i am new to both JSP and servlets. so i need to know where i should put the code u told i.e., in JSP page or in servlet or in script. I tried the same code in JSP with <% tags but it didnt work. So do tell me as to where i should put the code
18 years ago
I have problem in saving checkbox values to the database. I have a JSP form which has some 18 checkboxes in it. The form is like providing permissions to particular usergroup. Some group are allowed to use some permissions but say an administrator has chance to work on all modules. Once the check boxes are checked, value 1 should get saved in database either through JSP code or servlets code. We are actually using servlet for database connectivity like adding new record to databse, saving the record etc. How do i trap whether the check boxes are checked or not ? After trapping, how do pass the value 0 or 1 to database based on whether checked or unchecked.
SO now how i go about it ? i.e., saving the checked check box value in databse.
ANd also, when i select a particular group, i need to display all the checkboxes + checked checkboxes for which that group is given permissions
Here is a sample of code which i have written:

Do help me in this issue as early as possible. Eagerly waiting fr reply
thanks in advance
18 years ago