This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Problem with security 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 "Problem with security" Watch "Problem with security" New topic
Author

Problem with security

Tom Kowalski
Ranch Hand

Joined: Feb 17, 2009
Posts: 72
Hi, I have problem with security in my application.

This is my tomcat-users.xml file:


And this is part of my web.xml file:


When I open index.jsp page, authentication form appears, I'm writing login: tomcat, password: tomcat, prassing OK, but it doesn't work and the window (form) appears again. What I'm doing wrong?

And one more question, I noticed, that when this window is open (with this security form), and I'm opening a new window in a browser, this page doesn't want to load in it (but when I will close the first window, the second will load)? Why is it working like this?



SCJP, SCWCD, OCUP
udaykumar maddigatla
Ranch Hand

Joined: Feb 03, 2009
Posts: 69
Hi

In your tomcat-users.xml file try to add these two lines



and also add above rolenames to your username called 'tomcat' like this.

<user username="tomcat" password="tomcat" roles="tomcat,admin,manager"/>

Hope this will works.


SCJP 5.0(84%), SCWCD 5.0(97%), SCDJWS 5.0(98%)
 
GeeCON Prague 2014
 
subject: Problem with security