• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem While Enabling Authentication

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Authentication window doesnot appear when i access following url
http://localhost:8080/app3/welcome.jsp
When i use above url it directly shows welcome.jsp page without going on
Authentication window.
My webApplication app3 is stored under
C:\Tomcat 5.0\webapps\
My web.xml file is as follows

My tomcat-users.xml file is as follows


Please Help me.
Thanks
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you get any warning/errors in the console log
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no There is no warning/errors in the console log
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you should try

<security-role>
<role-name>admin</role-name>
</security-role>
<security-role>
<role-name>admin</role-name>
</security-role>
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i tried
<security-role>
<role-name>admin</role-name>
</security-role>
<security-role>
<role-name>member</role-name>
</security-role>

but it does not work
 
Alexey Korneychuk
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<role-name>member</role-name>
May be you want tell manager?
 
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi gowher,

Your DD is almost correct. Let's check it out :

You must replace the line <url-pattern>/app3/welcome.jsp</url-pattern>
with <url-pattern>/welcome.jsp</url-pattern>. For sure it will work.

The <url-pattern> must be relative to the root of the application, so if you use the url pattern /app3/welcome.jsp you are saying to container you want to constraint the resource at <a href="http://localhost:8080/app3/<b rel="nofollow">app3/welcome.jsp</b>" target="_blank">http://localhost:8080/app3/app3/welcome.jsp and not at <a href="http://localhost:8080/app3<b rel="nofollow">/welcome.jsp</b>" target="_blank">http://localhost:8080/app3/welcome.jsp as you would expected.

Did you get the point ?

Oh ! Don't forget to restart your web application in order to changes in DD have effect.
[ October 26, 2006: Message edited by: Edisandro Bessa ]
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Edisandro Bessa
I got window
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now there is another problem
when i run above url on window the authentication window appears
but when i run above url on Mozilla browser the authentication window doesnot appears and welcome.jsp page is displayed directly.
 
We begin by testing your absorbancy by exposing you to this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic