This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Glasfish: JDBC Realm and Session Tracking.

 
Greenhorn
Posts: 21
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
  • 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.

[moderator edit: show that it is about Glassfish]
 
Bartender
Posts: 2653
18
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have moved your post to our "Other Java Products and Servers " forum
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!