This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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 ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

EJB, JDBC Realm, Session tracking

 
Greenhorn
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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic