File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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?

udaykumar maddigatla
Ranch Hand

Joined: Feb 03, 2009
Posts: 69

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%)
I agree. Here's the link:
subject: Problem with security
jQuery in Action, 3rd edition