Is there a Java based prepackaged solution for user registration, cookie detection etc.?
I believe this is very common usage pattern of modern Java based web application:
If user visiting the website for the first time, send cookie with minimal http redirects.
If cookies enabled then immediately create cookie based account upon first visit.
If user opts in to register ( with email address/password) then created registered user account and also handle the option of user choosing to be permanently logged in (remember me option in login form).
If cookie disabled upon first time visit then handle this situation differently instead of keep on executing logic for cookie detection.
Is there a prepackage Java ( or grails) based solution th开发者_Python百科at takes care of all of the above instead of re-inventing the wheel again and again?
Take a look at the Grails Spring Security plugin:
http://www.grails.org/plugin/spring-security-core
http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/index.html
There's a Java EE standard, called JAAS, which specifies how a Java EE Server should handle this situation. It can be plugged to databases, LDAP servers and other data sources. The only thing missing is the user registration part, which is almost always very specific to each application.
As JAAS is not exactly trivial, there are some frameworks abstracting it, like Seam Security.
精彩评论