This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Unable to apply security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Unable to apply security" Watch "Unable to apply security" New topic
Author

Unable to apply security

phalgun archer
Greenhorn

Joined: Jan 09, 2006
Posts: 4
The following is the web.xml content

...............................

<security-constraint>
<web-resource-collection>
<http-method>
GET
</http-method>
<url-pattern>
/secret
</url-pattern>
</web-resource-collection>
<auth-constraint>
role1
</auth-constraint>
</security-constraint>

<login-config>
<auth-method>
FORM
</auth-method>
<realm-name>
Tomcat Manager Application
</realm-name>
<form-login-config>
<form-login-page>
/login.jsp
</form-login-page>
<form-error-page>
/app
</form-error-page>
</form-login-config>
</login-config>

...............................

if i put the following in http://localhost:8080/security/secret then the login page

appears. But when i put the user name and password for role role1, i am getting the error

page, that is /app. Any idea. Thanxs in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60798
    
  65

"Mr Rancher",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
phalgun archer
Greenhorn

Joined: Jan 09, 2006
Posts: 4
Bear

I really appreciate the site policy. The change has been done.

Regards
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
"arjuna",

Bear wrote quite specifically that a first name and a last name are required. Please change you name so that it conforms to the policy.

Welcome to JavaRanch!


Ping & DNS - my free Android networking tools app
phalgun archer
Greenhorn

Joined: Jan 09, 2006
Posts: 4
I really appreciate the site policy. The change has been done.

Regards
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Does the URL /secret actually resolve to something valid?


[Jess in Action][AskingGoodQuestions]
phalgun archer
Greenhorn

Joined: Jan 09, 2006
Posts: 4
Its refering to a valid servlet.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to apply security
 
Similar Threads
Redirect to the requested page failed using form-based authentication
Sharpen Your Pencil - PN 658
How do I setup form-based authentication?
form based authentication example
Tomcat Security