This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Glassfish and the fly likes Java EE Security configuration not working. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Glassfish
Reply Bookmark "Java EE Security configuration not working." Watch "Java EE Security configuration not working." New topic
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
    
  71

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java EE Security configuration not working.
 
Similar Threads
Is auth-constraint related to security-role?
Form based authentication in java server faces.
Realm question
HTTP 403 for authenticated users - FIXED
security-constraint login error