Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By Tolls

Thread: Same Login Page,Different Departments

  1. #1
    danpotter is offline Member
    Join Date
    May 2011
    Posts
    43
    Rep Power
    0

    Question Same Login Page,Different Departments

    Hey im Dan and im working on a Project.In my Project we will have departments like employees,admin.

    Condition is ,for both the Departments ,there should be only one login page,where admin should login using his username and password and Employee should login using his ID and password on same login page

    I know how to do all the things for one department either for Admin or for Emp,but i dont know how to make a login page usable by both..

    please help me...

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,039
    Rep Power
    20

    Default Re: Same Login Page,Different Departments

    That's usually done with roles.
    Logins will have roles associated with them, so in your case they would either be Employee or Admin.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    danpotter is offline Member
    Join Date
    May 2011
    Posts
    43
    Rep Power
    0

    Default Re: Same Login Page,Different Departments

    yah,thank you for ur reply...,but i dont know how to make it exactly in JSP,can u please explain me it and also give an example code,so that i can understand it very well..

  4. #4
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,039
    Rep Power
    20

    Default Re: Same Login Page,Different Departments

    It's not a coding question, though.
    It's a modelling one.
    DarrylBurke likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    danpotter is offline Member
    Join Date
    May 2011
    Posts
    43
    Rep Power
    0

    Default Re: Same Login Page,Different Departments

    ok,modeling based means..,do we need to do anything with deployment descriptor???[web.xml]

  6. #6
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,039
    Rep Power
    20

    Default Re: Same Login Page,Different Departments

    I wouldn't have thought so.
    Your model (and then your logic) should simply handle the two roles.
    In your case it seems Roles and Departments are tightly related.

    I would also say that username and user id are pretty much the same thing as well.
    In the database they'd be the same column in the database table. Anything else strikes me as overcomplicated for little gain (unless your requirements can explain why they wouldn't be the same).
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    danpotter is offline Member
    Join Date
    May 2011
    Posts
    43
    Rep Power
    0

Similar Threads

  1. login page
    By banie in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-09-2008, 08:37 AM
  2. JSP login page
    By banie in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-06-2008, 04:23 AM
  3. login page
    By keerthi_y19 in forum New To Java
    Replies: 9
    Last Post: 08-06-2008, 11:58 AM
  4. Login page
    By banie in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-03-2008, 02:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •