Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with security

 
Tom Kowalski
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
udaykumar maddigatla
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic