How to implement self-managing web users with Java EE 6?
I want to create a simple web application that will have self-registering users. In other words, I want users to be able to register, log on, manage their data, log off, and if they want, delete their account. It is kind of a hobby project and just to learn something new, I decided to try to create this web site using latest Java EE, which I have not used before.

I spent several hours reading about JAAS, authentication realms, etc and I found lots of ways to implement security based on users and roles defined on the server (like GlassFish), but I have not found any examples or pointers to how to implement a solution where users can just fill out a registration form on a web page and become users in the system. Of course, I can simple have a database table with usernames and password hashes and implement everything manually, but it defeats the purpose.

Therefore, my questions are:
1. Is Java EE's standard authentication and security framework suitable for implementing an app where users can manage themselves? Or is it more "enterprise" and relies on external authentication and user management?
2. If it is easy to do what I need, please point me to some samples.

Thanks!
How to implement self-managing web users with Java EE 6?
===

I want to create a simple web application that will have self-registering users. In other words, I want users to be able to register, log on, manage their data, log off, and if they want, delete their account. It is kind of a hobby project and just to learn something new, I decided to try to create this web site using latest Java EE, which I have not used before.

I spent several hours reading about JAAS, authentication realms, etc and I found lots of ways to implement security based on users and roles defined on the server (like GlassFish), but I have not found any examples or pointers to how to implement a solution where users can just fill out a registration form on a web page and become users in the system. Of course, I can simple have a database table with usernames and password hashes and implement everything manually, but it defeats the purpose.

Therefore, my questions are:
1. Is Java EE's standard authentication and security framework suitable for implementing an app where users can manage themselves? Or is it more "enterprise" and relies on external authentication and user management?
2. If it is easy to do what I need, please point me to some samples.

Thanks!