• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

EJB, JDBC Realm, Session tracking

Posts: 21
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I am developing shopping cart application with EJB. the application will be web based .ie. servlet jsp will be used with EJB.
i have JavaDB. I have table named "Users". Table has 2 columns 1. user and 2. password.

When the application is started, home.jsp will be displayed.

The Home page(home.jsp) of my application contains:
1. Login form with login Button and Register link.
The user will provide his credentials. His credentials will be checked against the JAVA DB Users table. If correct then a user page will appear to him showing his account details and other things: Products List etc,,,,,
If he is new user and want to register himself then, user will click on register link. Then registration Page will appear in front him and then he will register himself and his data will be saved in database.

2. Products Link: any body clicking on the products will be migrated to the products page. the list will appear. if he wants to purchase some items, he will check the checkboxes and will click on submit button. If the user has not logged in then, the login form with register link will appear. Once he enter his credentials, his credentials will be checked against the JAVA DB Users table. if correct , then his selected products will be viewd to him and session id will be tracked which will be used for further transactions.

This thing have been easily achieved using Servlet,JSp and JDBC.

Now if i want to use JDBC Realm(Security), then how to configure my glassfish server for such things.
Requirements are:
1. Checking Credentials using JDBC Realm
2. Registering new user and data to be stored in Database User table using JDBC Realm
3. if credentials are correct, then mainatin the session and that sessionid will be used for further transactions.

PLease help me with codes or any configuration codes.
    Bookmark Topic Watch Topic
  • New Topic