authentication - How I can create new user from Java class to GlassFish? -


i'm creating basic web application user can register , login. there registration, login , login error page. i'm using glassfish server authentication.

i know there possible way create new user java class or servlet when user created, saved 'file' realm of glassfish? more specific here's want do:

  1. create user using entity class defined.
  2. save user entity database.
  3. create new user username , password glassfish file realm.

this far have got requirement working quiet neat because must done manually everytime when want create new user. there anyway automate process?

i found solution this. solution need create jdbc realm in glassfish , config giving required information such jndi, user group table, user name column, password column, groups table , etc.

note: can't file realm, since in file realm save user details file , not read there.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -