Netbeans Access to Tomcat Server

Posted on 2013-10-11
Medium Priority
Last Modified: 2016-09-14
OS: Windows 7
IDE: Netbeans 7.1.2
Server: Tomcat 7.0

I installed tomcat with the Microsoft installer.

When I try to refresh web applications or run a jsp file, I receive the following error message:
Deployment error: Access to Tomcat server has not been authorized. Set the correct username and password with the "manager-script" role in the Tomcat customizer in the Server Manager.

I made changes to my tomcat-users.xml file
Here is how the file looks:

<?xml version='1.0' encoding='cp1252'?>
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at


  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  See the License for the specific language governing permissions and
  limitations under the License.
<user name="myuser" password="mypwd" roles="manager-script" />
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
  NOTE:  The sample user and role entries below are wrapped in a comment
  and thus are ignored when reading this file. Do not forget to remove
  <!.. ..> that surrounds them.

  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <user username="myuser" password="mypwd" roles="manager-script"/>
  <user username="myuser" password="mypwd" roles="admin-gui,manager-gui"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>


<user password="mypwd" roles="manager-script,admin" username="myuser" />

Is there a way to get Netbeans autorized to use tomcat?
Question by:CABRLU63
  • 2
LVL 36

Expert Comment

ID: 39567564
Should lines like these...

<user username="myuser" password="mypwd" roles="manager-script"/>

actually be this..

<user name="myuser" password="mypwd" roles="manager-script"/>

(note the attribute is called "name" not "username")

Accepted Solution

CABRLU63 earned 0 total points
ID: 39575025
Thanks for the question
I removed the cache directory

This solved my issue

Author Closing Comment

ID: 39585818
My comments contains the solution

Expert Comment

by:445421 65656565
ID: 41799144

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The Super Bowl is just days away. Millions of advertising dollars will be spent in just a few hours to drive people to websites around the globe. Optimizing your site in anticipation of a big event like this (and the traffic surges that follow) will…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question