tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Kam <moonblade.w...@gmail.com>
Subject Re: Error
Date Wed, 04 Jul 2012 05:50:54 GMT
First your should find the location of your tomcat-users.xml first,
which is normally located here :
${TOMCAT_HOME}\conf\tomcat-users.xml

If you are using tomcat bundled with Netbeans, the ${TOMCAT_HOME}
should be somewhere in
<personal user folder>\.netbeans\<nb-version>\apache-tomcat-<version>_base\conf

You should see something like this in the tomcat-users.xml :
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>

Now, you should modify the file : add the manager role, and assign it
to a new user named 'she', for example ..
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <user username="she" password="she" roles="manager"/>
  <user username="tomcat" password="tomcat" roles="tomcat,manager"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>

When running it, and the authentication popup appears, you type "she"
for both the user and password

That should do it ..



On Wed, Jul 4, 2012 at 12:37 PM, Supun Malinga <supunm@wso2.com> wrote:
> Hi,
>
> Following would be helpful.
> http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Configuring_Manager_Application_Access
>
> thanks,
>
> On Wed, Jul 4, 2012 at 11:01 AM, she <she.gsck@gmail.com> wrote:
>
>> Dear sir,
>>
>> I am working with Netbeans 6.7.1 + tomcat 6.0.18 having
>> Access to Tomcat server has not been authorized. Set the correct username
>> and
>> password with the "manager" role in the Tomcat customizer in the Server
>> Manager.
>> See the server log for details.
>>
>>
>> init:
>> deps-module-jar:
>> deps-ear-jar:
>> deps-jar:
>> library-inclusion-in-archive:
>> library-inclusion-in-manifest:
>> compile:
>> compile-jsps:
>> Deployment error:
>> Access to Tomcat server has not been authorized. Set the correct username
>> and
>> password with the "manager" role in the Tomcat customizer in the Server
>> Manager.
>> See the server log for details.
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
>> .java:224)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
>> .java:132)
>>         at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103)
>>         at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>>         at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source)
>>         at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
>> a:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>>         at org.apache.tools.ant.Task.perform(Task.java:348)
>>         at org.apache.tools.ant.Target.execute(Target.java:357)
>>         at org.apache.tools.ant.Target.performTasks(Target.java:385)
>>         at
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
>>         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>>         at
>>
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
>> 41)
>>         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>>         at
>> org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
>>         at
>> org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:497)
>>         at
>> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
>> Caused by: java.lang.IllegalStateException: Access to Tomcat server has
>> not been
>> authorized. Set the correct username and password with the "manager" role
>> in the
>> Tomcat customizer in the Server Manager.
>>         at
>>
>> org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:394)
>>         at
>> org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:622)
>>         at
>>
>> org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.jav
>> a:433)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(Targ
>> etServer.java:393)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
>> erences(TargetServer.java:349)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
>> erences(TargetServer.java:298)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef
>> erences(TargetServer.java:295)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(
>> TargetServer.java:417)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:16
>> 3)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:
>> 556)
>>         at
>>
>> org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment
>> .java:189)
>>         ... 17 more
>> Caused by: org.netbeans.modules.tomcat5.AuthorizationException
>>         at
>>
>> org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:395)
>>         ... 27 more
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> --
> Supun Malinga,



-- 
Do not pursue the past. Do not lose yourself in the future.
The past no longer is. The future has not yet come.
Looking deeply at life as it is in the very here and now,
the practitioner dwells in stability and freedom.
(Thich Nhat Hanh)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message