how to implementing good security, example for authentication in Servlet?..
Assume that i have application which has Create, Read, Update, and Delete method..
Admin could accessed all methods..
but Employee just could read the data..
How to good implementing that requirements?..
Do i have to provides 2 Servlet with 2 forms?..
or could i have one servlet with one form?..
i interested Spring Security which has Method security implements..
could i do like Spring Security in Servlet?..
i uses JBoss 5.1 + JSP + Servlet + EJB3..
please give me any suggestion..
Thanks in advance ..
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
The easiest would be to use the authentication/authorization framework that's built into the Servlet API. It implements a username/password/role scheme that makes authentication information available through the HttpServletRequest's getRemoteUser and isUserInRole methods.
Ping & DNS - updated with new look and Ping home screen widget
How to set username/password/role scheme in HttpServletRequest?..
assume that i have login application..
the users who wants to login to my application must filled the Login (username, and password)..
and the users who can login to my application is admin and employers?..
how to set that user's role (either admin/employee) to HttpServletRequest?..