views:

1896

answers:

2

I'm trying to follow a tutorial to make an extremely basic Java web application in NetBeans.

When I try to run it, a dialogue box appears title "Authentication Required". Inside the dialogue box there the heading "Tomcat Manager Application" and fields for "User Name" and "Password."

Investigating this, I've come to understand that I should edit the file

\TOMCAT_HOME\conf\tomcat-users.xml

to include something like:

<user username="user" password="password" roles="standard,manager"/>

so I've done that, but it hasn't helped yet.

Can anyone provide some insight? I'm using Tomcat 6.0.20, NetBeans 6.7.1, and Windows Vista. I'm using jdk1.7.0, but Java hasn't really entered into this project yet.

+1  A: 

When you're launching tomcat server from netbeans IDE you need to check in menu "tools->servers" on connection tab for tomcat server - there is catalina base directory. And you need to include something like:

 <role rolename="manager"/>
  <user username="admin" password="admin" roles="manager"/>

at file

\CATALINA_BASE\conf\tomcat-users.xml

or use username automatically generated by IDE with description already placed in this file or on connection tab

Valery Barysok
A: 

I have a similar problem.. Inspite of logging in with a valid username and password, it is showing a page something like this:

HTTP Status 403 - Access to the requested resource has been denied

type Status report

message Access to the requested resource has been denied

description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.

Apache Tomcat/5.5.27

Yamini
Welcome at Stackoverflow! This doesn't look like an answer nor a question. If you have a question, press `Ask Question` button at the right top. This way you'll get answers. Please don't post noise like "I have this problem too!" as answers on other's questions :)
BalusC