• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to get Authentication popup window

 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i am reading web app security in HFJS and developed a servlet file with doGet() method.
following are the entries made in DD
i am not getting authentication window when the servlet is loaded into browser.
please tell me solution.
<security-constraint>
<web-resource-constraint>
<web-resource-name>MovieList</web-resource-name>
<url-pattern>/MovieList</url-pattern>
<http-method>GET</http-method>
</web-resource-constraint>

<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>

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

role name is set in tomcat-users.xml

Thanks and Regards,
 
Abhishek Dharwadkar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no thing as GET in the auth-metho tag of login-config tag.

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


The only possible values it can have are:
BASIC,
DIGEST,
CLIENT-CERT, or
FORM.

If you use form authentication you will require a few other tags:
<form-login-config>
<form-login-page>/Login.html</form-login-page>
<form-error-page>/Login.html</form-error-page>
</form-login-config>

Thanks & Regards,
Abhishek
 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have changed <auth-method> tag value to BASIC, but still i am not unable to see authentication popup window
 
Karthikeyan Varadarajan
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give realm-name also if the type is BASIC
 
Venkat Perumalla
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its <web-resource-collection> not <web-resource-constraint> tag,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic