File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes Glasfish: JDBC Realm and Session Tracking. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Glasfish: JDBC Realm and Session Tracking." Watch "Glasfish: JDBC Realm and Session Tracking." New topic
Author

Glasfish: JDBC Realm and Session Tracking.

Gaurav Dighe
Greenhorn

Joined: Jun 25, 2009
Posts: 21

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]


Thanks & Regards,
Gaurav Dighe
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2477
    
    7

I have moved your post to our "Other Java Products and Servers " forum


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Glasfish: JDBC Realm and Session Tracking.
 
Similar Threads
EJB, JDBC Realm, Session tracking
EJB3 Doubts
Home page should be displayed on successfull login after session expired
Problem in siteminder logoff
Simple JSP Login Page Help needed