• Post Reply Bookmark Topic Watch Topic
  • New Topic

tomcat basic auth method problems  RSS feed

 
subathra sangameswaran
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could u please help me to trace where the problem lies?

Only if I configure the security-constraint url-pattern to be *, the login page appears. If i <url-pattern>/form.view</url-pattern>, i do not get the login screen, when I call the page
http://localhost:8080/Food/form.view
Here is an extract of my web.xml

<login-config>
<auth-method>BASIC</auth-method>
</login-config>

<security-constraint>

<web-resource-collection>
<web-resource-name>controller</web-resource-name>
<url-pattern>/form.view</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>

<auth-constraint>
<role-name>Admin</role-name>
</auth-constraint>

<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>

</security-constraint>

<security-role>
<role-name>Admin</role-name>
<role-name>Guest</role-name>
</security-role>

Thanks
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By * you mean, *.view?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!