0

I have a webproject with tomcat, java and jsp. I have done an authentication with Realm (Basic Authentication) in my server.xml from the tomcat like this:

  <Realm  className="org.apache.catalina.realm.JDBCRealm"
         driverName="org.gjt.mm.mysql.Driver"
      connectionURL="jdbc:mysql://localhost/*****"
     connectionName="***" connectionPassword="****"
          userTable="person" userNameCol="personid" userCredCol="passwort"
      userRoleTable="userroles" roleNameCol="rolename" />

So I have two Datatables: person and userroles.

So when I will login, I receive the standard login window, where I have to write my username and passwort...

But know I want one more option(field projectname) in this login window. like this:

username:
passwort: 
projectname:(Combobox with all projects in the databasetable projects)

and if the user and passwort is correct, I will look in the table userroles, if this user have the rights for this project:

the userroletable looks like this:

userroleid userrolename  projectname  personid 

How I can do one more option in the login window? for example

thanks a lot for your help.

Theyouthis
  • 4,681
  • 7
  • 29
  • 61
java java
  • 357
  • 1
  • 7
  • 22

1 Answers1

1

You can't do this with Basic authentication, where the browser provides the form. You will have to use Form authentication and provide your own form.

user207421
  • 289,834
  • 37
  • 266
  • 440