Netbeans Access to Tomcat Server

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

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<tomcat-users>
<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"/>

</tomcat-users>

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

Is there a way to get Netbeans autorized to use tomcat?
CABRLU63Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
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")
0
CABRLU63Author Commented:
Thanks for the question
I removed the cache directory
c:\users\myname\.netbeans\7.1.2\var\cache

This solved my issue
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CABRLU63Author Commented:
My comments contains the solution
0
445421 65656565Commented:
!@#$%^&*)(*&^%$#@!@#$%^&*()(*&^%$#@!~!@#$%^&*())(*&^%$#@!~!@#$%^&*()))(*&^%$#@!~
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.