This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Can't get past BASIC authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Can Watch "Can New topic
Author

Can't get past BASIC authentication

Paul Kemp
Ranch Hand

Joined: Dec 03, 2008
Posts: 35
My tomcat-users.xml file looks like this:



And my DD:



My index.html page has this link on it, to private/private-page.jsp.

I click on the link and I get the ugly grey box requiring me to enter a user name and password for BASIC authentication.
All is good.
I type in username = paul, password=kemp, but the grey box won’t let me through: the grey box just keeps on coming back.

What am I doing wrong?

Thanks
Paul Kemp
Ranch Hand

Joined: Dec 03, 2008
Posts: 35
I fixed this problem.

In case anyone else experiences this, the issue was not with the code.

I am using the Eclipse IDE, and starting and stopping the server with a Tomcat plugin. Whilst developing, I encountered the behaviour described above.

However, when I exported the project as a WAR file to the Tomcat directory, and started the Tomcat server from its bin folder, the program worked correctly.
Tuna Töre
Ranch Hand

Joined: Aug 17, 2008
Posts: 219

Wooww Paul ...Did you solve this problem.
I had the same issue one month ago when I was studying security concepts... And I didn't find a solution for that(grey box never closed)...
I am now going to try your solution..
Thanks...


blog: http://tunatore.wordpress.com
SCJP 6.0 + SCWCD 1.5
Tuna Töre
Ranch Hand

Joined: Aug 17, 2008
Posts: 219

Yes this works for me too..
Moreover friends do not forget to copy your war file under webapps folder under apache tomcat... because eclipse put its project in a different folder like
wtp...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't get past BASIC authentication