Web login (JSP, Servlet) with roles and users list stored using db4o

Dear all,
I would be grateful if someone of you (the masters out there) could help me with the build of an application where the first page will be a login page.
The users will be devided in 3 categories (user, editor, administrator) and there member information will be saved in db4o database.
If the user has not been registered in the past then a registration page should come up allowing him to be registered and keep his details in a db4o database on the same site.
I am using JSEE8 and the site will be sent to a Tomcat server on the net.
Please please please HELP

I am giving some code for to redirect as the user is, But before that you have to made a extra coloumn "role" in your security table. and put admin, user as respective roles.
doPost(HttpReq...........)
String user = req.getParameter("UserName"):
String pass= req.getParameter("Password");
Then Connect the database with ur code ie class.forName etc
String sql= "Select * from security_table where Username= ' "+user+" ' and Password= ' "+pass+" ' ";
Statement stmt = conn.createStatement();
ResultSet rs= stmt.exequteQuary(sql);
if(rs.next)
String S1=rs.getString("Username");
String S2= rs.getString("Password");
String S3= rs.getString("Role");
if(S1.equals(user) && S2.equals(pass) && S3.equals.(admin)){
req.sendRedirect(http:// full path name of the page)
else if( S1.equals(user) && S2.equals(pass) && S3.equals.(user))
req.sendRedirect(http:// full path name of the page)
}else
req.sendRedirect(http:// full path name of the Error page)
}

Similar Messages

  • WEB UI account creation with role and grouping

    Hi All,
    I can create account in SalesPro->Account Management-> Account - New
    I don't have an option of selecting BP Role or Grouping for number range...
    Should i be using any other WEBUI Role in order to create Account with an option of BP Role and Grouping
    Thanks
    Amish

    Hello there,
    The BP Role which will be used and even the number ranges are generally not used for Web UI usage. Instead we provide different configurations of the same Account Creation view based on the Component Usage and three different keys.
    The functionality you are looking for can be achieved by creating different configurations.
    To create different configurations of the same view in Web UI please search on the below link :
    [http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUIFramework|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUIFramework]
    Please reply if this helps.
    Best regards,
    Vinamra.

  • Problem with role and user; user can't see the table

    Hello forum,
    I've created a role:
    CREATE ROLE enr_service;
    GRANT CONNECT TO enr_service;
    GRANT ALL ON Locataires TO enr_service;
    GRANT ALL ON Batiments TO enr_service;
    GRANT ALL ON Sportifs TO enr_service;
    GRANT SELECT ON Epreuves TO enr_service;
    and also a user:
    CREATE USER ENR1 IDENTIFIED BY password QUOTA UNLIMITED ON USERS;
    GRANT enr_service TO ENR1;
    ALTER USER ENR1 DEFAULT ROLE enr_service;
    ALTER USER ENR1 DEFAULT TABLESPACE USERS;
    I can connect to the database with this user but when I try to query a table he's been granted access to I get an error message:
    SELECT * FROM Sportifs;
    ORA-00942: table or view does not exists
    I can't see what I've done wrong. Any help is appreciated.
    Sebastian

    user2019788 wrote:
    Hello forum,
    I've created a role:
    CREATE ROLE enr_service;
    GRANT CONNECT TO enr_service;
    GRANT ALL ON Locataires TO enr_service;
    GRANT ALL ON Batiments TO enr_service;
    GRANT ALL ON Sportifs TO enr_service;
    GRANT SELECT ON Epreuves TO enr_service;
    and also a user:
    CREATE USER ENR1 IDENTIFIED BY password QUOTA UNLIMITED ON USERS;
    GRANT enr_service TO ENR1;
    ALTER USER ENR1 DEFAULT ROLE enr_service;
    ALTER USER ENR1 DEFAULT TABLESPACE USERS;
    I can connect to the database with this user but when I try to query a table he's been granted access to I get an error message:
    SELECT * FROM Sportifs;
    ORA-00942: table or view does not exists
    I can't see what I've done wrong. Any help is appreciated.
    SebastianThat's probably because ENR1 doesn't have any table named SPORTIFS and he didn't qualify the table name with the schema name ...

  • Problem with Role and User Distribution to the SAP System

    Hi to all.
    I've a problem when i try to transfer roles from portal to SAP CRM. (System Administration --> Permissions --> SAP Authorizations).
    If I select from the drop down list the SAP Alias corresponding to the connector to the target system an error is displayed:
    class com.sapportals.connector.connection.ConnectionFailedExceptionConnection Failed: Nested Exception. Failed to get connection. Please contact your admin.
    I think the problem is in the connector configuration since the connector test fails too (due to User attribution problems I think)
    Thank you for any help!

    Hello Mario,
    I have the same problem.
    Did you find a solution for this?
    Please let me know.
    Thanks in advance, Michael

  • Problem with Roles and Triggers

    I'm having a strange problem with Roles and Triggers in Oracle. It's a little difficult to describe, so bear with me...
    I'm trying to create a trigger that inserts records into a table belonging to a different user/owner. Of course, the owner of this trigger needs rights to insert records into this other table. I find that if I add these rights directly to the owner of the trigger, everything works okay and the trigger compiles successfully.
    However, if I first create a Role and grant the "insert" rights to it, and then assign this role to the owner of the trigger, the trigger does not compile successfully.
    To illustrate this, here's an example script. I'm using Oracle 10g Release 2...
    -- Clean up...
    DROP TABLE TestUser.TrigTable;
    DROP TABLE TestUser2.TestTable;
    DROP ROLE TestRole;
    DROP TRIGGER TestUser.TestTrigger;
    DROP USER TestUser CASCADE;
    DROP USER TestUser2 CASCADE;
    -- Create Users...
    CREATE USER TestUser IDENTIFIED BY password DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "USERS";
    CREATE USER TestUser2 IDENTIFIED BY password DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "USERS";
    CREATE TABLE TestUser.TrigTable (TestColumn VARCHAR2(40));
    CREATE TABLE TestUser2.TestTable (TestColumn VARCHAR2(40));
    -- Grant Insert rights on TestTable to TestRole...
    CREATE ROLE TestRole NOT IDENTIFIED;
    GRANT INSERT ON TestUser2.TestTable TO TestRole;
    -- Add TestRole to TestUser. TestUser should now have rights to INSERT on TestTable
    GRANT TestRole TO TestUser;
    ALTER USER TestUser DEFAULT ROLE ALL;
    -- Now, create the trigger. This compiles unsuccessfully...
    CREATE TRIGGER TestUser.TestTrigger AFTER INSERT ON TestUser.TrigTable
    BEGIN
    INSERT INTO TestUser2.TestTable (TestColumn) VALUES ('Test');
    END;
    When I do a "SHOW ERRORS;" after this, I get:
    SQL> show errors;
    Errors for TRIGGER TESTUSER.TESTTRIGGER:
    LINE/COL ERROR
    2/3 PL/SQL: SQL Statement ignored
    2/25 PL/SQL: ORA-00942: table or view does not exist
    SQL>
    As I said above, if I just add the Insert rights directly to TestUser, the trigger compiles perfectly. Does anyone know why this is happening?
    Thanks!
    Adrian

    Hi Raghu,
    If the insert rights exist only on TestRole, and TestRole is assigned to TestUser, I can do the INSERT statement you suggest with no problems if I just execute it from SQLPlus (logged in as TestUser).
    The question is, why does the same INSERT fail when it's inside the trigger?

  • Is it possible to export and import the roles and users tables?

    Hi,
    is there any possibility to export and import the role and user definitions?
    We have a SAP MDM repository with a lot of roles and users and also with a lot of changes.
    And now I'm searching for a fast and efficient way of managing the roles and users.
    Thanks and Regards, Melanie

    Hi Melanie,
    There is no export/import functionality for roles and users.  The only way to manage these in an automated way would be to write a program that uses the Java or ABAP APIs.  Both APIs expose functionality to create, update and delete roles and users.
    Hope this helps,
    Richard

  • Table that stores the business role and user id mapping

    Hi,
    i want to know the table that stores the Business role and the business role and user id mapping in CRM system.
    Thanks in Advance.
    Regards,
    Pricy

    Hi Mary,
    There is no direct table but there is a way to find it.
    HRP1263 is the table where business roles are stored when maintained at org level. These are stored against the Position.
    For getting user ID and position linkage refer table HRP1001.
    In HRP1001 table use below criteria to get the User and Position.
    OTYPE = CP
    SCLAS = US
    SOBID = User ID
    ENDDA = 31.12.9999
    Get the OBJID
    Query the HRP1001 table again with following
    OTYPE = CP
    OBJID = OBJID from above Query
    ENDDA = 31.12.9999
    SCLAS = S
    SOBID = Thats Position.
    Pass the position to HRP1263 as below.
    OTYPE = S
    OBJID = POSITION
    PROFILE - Thats business role assigned for the given position and user.
    Hope this is helpful.
    Regards,
    Naresh

  • Configuring roles and users (adf security) application context wise.

    Dear All,
    I referred this tutorial (http://biemond.blogspot.com/2008/12/using-database-tables-as-authentication.html) which shows how to hook up adf security with database schema but at domain level which will be common to all applications in that domain. I want to make it different to each application. (i.e each application will use differene database schema for storing user credientials i.e enterprise roles,application roles and users.)
    Can any one please point me to proper way..
    Regards,
    Santosh
    jdev 11.1.1.2.0

    Dear Frank,
    <i>
    Instead you have a single identity management system and have the application policies being different for the applications.Using ADF Security, users and groups can have different privileges in different applications
    </i>
    suppose i have 3 applications that use adf security, the users will be common to all applications. right..?Roles and group can be different for applications.
    application polices means roles and group..?
    So how it(application polices) can be made different for applications? is it inbuilt or some configurations needed ?. Can you point me to some blogs or tutorials for more reference.
    Bet: Incase i hook up adf security with database schema.
    Regards,
    Santosh.

  • Impossible to set up a TC with admin and users privileges

    Hi,
    Sorry for my english first. I'm not an english speaker...
    That's one week I'm playing with my Tc to try to set it up with admin and users privileges and and doesn't succeed to find a good way to do it....
    What I want to do: set up my Tc so that I'm an admin and can do whatever I want in the folders of each user. I want the user to have access to one folder with their name. Let's say I would like to user my TC like a usual network drive or NAS.
    What I discover: if I enable file sharing with accounts on my TC and define two users user1 and user2 with Read write privileges, user1 can see a folder user1 and put whatever he wants in it and there's a share folder for user1 and user2. BUT I cannot be admin on the TC when account filesharing is on. It means I cannot put anything in user1 folder beacuse I don't see user1 folder. It is just like if you have user accounts on TC you can just change the privileges but not defined an administrator. I'm able to see user1 folder for instance solely changing the filesharing back to secure shared disks "with time capsule password". If i do so I can see all the folders on the TC.
    But it's very annoying because it means that each time I want to put a file inside the folder of one of my user, I have to restart my TC "with time capsule password", put the file, set it up back to user account and restart again the TC.... Not really practical!
    Anyone got an idea how to use the Tc with user accounts (one admin and others users...)

    I forgot to mention that I tried also another method: giving guest access to TC to my two users but there are several problems here: first they can only read (if not they would have the same privileges as me) what means they can put any document in the TC. Second, they see all the folders on the TC and the idea is that they can only see the shared one....

  • Identify system defained roles and user defained roles

    Hi,
    I have an issue.
    Oracle Version : 9.2.0.1.0
    Operating system: Windows 2000 server
    How can we identify system defained roles and user defained roles?
    Please help me to solve this.
    Regards,
    Mat.

    Check yourself these views
    DBA_ROLES
    DBA_ROLE_PRIVS
    USER_ROLE_PRIVS
    ROLE_ROLE_PRIVS
    ROLE_SYS_PRIVS
    ROLE_TAB_PRIVS
    SESSION_ROLES
    For default predefined roles in the database, take a look at the below url.
    http://youngcow.net/doc/oracle10g/network.102/b14266/admusers.htm#i1008784
    Regards,
    Sabdar Syed.

  • HT3529 When texting with other iphone users, the text used to be in a blue bubble. Now it's green. What happened? Am I being charged for these text messages now? I'm with Verizon if that matters.

    When texting with other iphone users, the text used to be in a blue bubble. Now it's green. What happened? Am I being charged for these text messages now? I'm with Verizon if that matters.

    Thanks for the help, Allan Sampson.
    I updated itunes, shut the phone off and on, it still didn't give me blue bubbles. Kept following the suggestions on the page ...  I didn't know there was an IMessaging switch, but, shoot, it was OFF. Anyway, I toggled it on and now the text bubbles are blue again.

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • HT204053 If I have set up my Mac with two different users,  can I use two different Apple IDs on the same Mac?

    If I have set up my Mac with two different users,  can I use two different Apple IDs on the same Mac?

    Each user account may have its own Apple ID.

  • TS3376 I had my iphone set up to be tracked as registered with iCloud and it had been using it for a year one day it said no devices registered and stopped working why???

    I had my iphone set up to be tracked as registered with iCloud and it had been using it for a year today it said no devices registered and stopped working even though i tracked the selected iphone 4 device an hour earlier why did it do this???

    So basically the phone I was tracking was working an hour earlier it had no signal at times when it did pick up a signal it located it easily but an hour later the message came up no devices registered when my friend returned home I Checked the device I was tracking to make sure find my iphone was on but it was off and my friend didnt turn it off so my question is why did it turn itself off???
    Confused?

  • TS1538 hi i updated my iphone 4 with itunes and now i cannot use my phone as i keep getting error 16 after trying to restore my phone....i cannot afford to replace ..can any body help me...the phone is out of warrenty so apple do not want to know....pleas

    hi i updated my iphone 4 with itunes and now i cannot use my phone as i keep getting error 16 after trying to restore my phone....i cannot afford to replace ..can any body help me...the phone is out of warrenty so apple do not want to know....please any help

    https://discussions.apple.com/message/23100453#23100453
    more hits from the search
    https://www.google.dk/search?q=restore+itphone+error+16&oq=restore+itphone+error +16&aqs=chrome..69i57j0l5.11485j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8

Maybe you are looking for

  • How to know which Action has been done by a Dialog in ControlsFX?

    Hello! I am using ControlsFX for the "Dialog" class. This class lets you build a dialog with "Node" Content. I set the content to a GridPane and and had wanted to set up a custom Action. There are premade Actions like "OK" "CANCEL "YES" "NO" "CLOSE"

  • [Help] How to check the object locks held by a specific thread?

    As the title I want to check locks held by a specific thread. How can I do this? In Java lock is acquired and release automatically by stating synchronized keyword. I have no idea on how to check the lock status and who owns whick lock. Regards, Skee

  • Pdf causes problem with opening files: help, please!

    The operating system on my computer is Windows xp and I use Adobe version 11.0.6. I am having a problem that arises when I get a warning message (particularly when opening pdf or xls files): "AcroRd32.exe - Application Error: The exception unknown so

  • Reading the library contents - what's the secret?

    What's the simplest way to read a library - specifically, given library myLibrary how can you find out what classes are defined for the library as well as their type? I haven't found anything in the online help, but I have to believe if the project w

  • ITunes for Mac not opening in new machine

    I posted this in the wrong forum by mistake, so I am reposting it in the correct place. I bought a new machine (Macbook Pro) and used migration assistant to copy my files. On my new machine, iTunes is not working. It does not open. I upgraded to the