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]
Joined: Mar 28, 2007
You can also use ACEGI security framework for spring framework Its available at
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Joined: Mar 22, 2005
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.
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?..