| Author |
Java EE Security configuration not working.
|
chaitanya karthikk
Ranch Hand
Joined: Sep 15, 2009
Posts: 781
|
|
Hi all, I am trying to learn Java EE security. I configured security-constraint in web.xml file as
In glassfish server I have added 2 users in the file realms and also enabled "Default Principal To Role Mapping" option. But when I to tried to access any file under secure folder I could actually view it instead of being redirected to /public/login.jsp page.
Can anyone please explain me how to configure security in my web application.
Thank you all in advance. Good day.
|
Love all, trust a few, do wrong to none.
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8209
|
|
Are you sure you are doing a POST? Your security configuration has been configured for only the POST method and will not be applied for GET and other methods.
|
[My Blog] [JavaRanch Journal]
|
 |
chaitanya karthikk
Ranch Hand
Joined: Sep 15, 2009
Posts: 781
|
|
|
Thank you Jai for pointing the problem. I am doing a redirection from index.jsp. I included GET and it is working now.
|
 |
 |
|
|
subject: Java EE Security configuration not working.
|
|
|