NetBeans的7.0.1:访问Tomcat服务器没有被授权 [英] NetBeans 7.0.1: Access to Tomcat server has not been authorized
问题描述
我是初学者,刚开始用JSP和我停留在起跑线。请帮助我。
我已经下载 catalina.bat中
和的setclasspath.bat
中有正确的位置 / tomcat的/ bin中/
但仍然得到授权的错误。我已经看到了类似的帖子和编辑我的的tomcat-users.xml中
这一行<使用者的用户名=根密码=1234的角色=经理脚本/>
i am a beginner, just started with JSP and am stuck at the starting. please help me out.
i have downloaded catalina.bat
and setclasspath.bat
in there proper location /tomcat/bin/
but still getting the error of authorization. i have seen a similar post and edited my tomcat-users.xml
with this line <user username="root" password="1234" roles="manager-script"/>
但仍然没有能够成功运行。
but still NOT able to run it successfully.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:232)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: java.lang.IllegalStateException: 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.
at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:398)
at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:639)
at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:450)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(TargetServer.java:417)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:372)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:321)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:318)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:439)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:174)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:579)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:197)
... 16 more
Caused by: org.netbeans.modules.tomcat5.AuthorizationException
at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:399)
... 26 more
BUILD FAILED (total time: 11 seconds)
有这方面的帮助将是救星我,我pretty上这么多天真。
thanx提前:)
any help on this would be saviour for me, i am pretty much naive on this. thanx in advance :)
推荐答案
在同一台服务器的错误我已经为我改变了/conf/tomcat-users.xml
The same server error I had for which I changed the /conf/tomcat-users.xml
第1步:
更改的tomcat-users.xml中
Changing tomcat-users.xml
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager-gui"/>
<user password="tomcat" roles="tomcat,manager-gui" username="tomcat"/>
<user password="tomcat" roles="tomcat,role1" username="both"/>
<user password="tomcat" roles="role1" username="role1"/>
<user password="pass" roles="manager-script,admin" username="me"/>
</tomcat-users>
我添加了两个角色,经理脚本和管理。
I added two roles manager-script and admin.
您可以在配置管理器
第2步:
添加角色后,您需要将这些凭证添加到Netbeans的服务器配置。
After adding the role you will need to add those credentials to Netbeans server configuration.
- 转到窗口 - >服务
- 选择服务器。
选择您的Tomcat实例并单击鼠标右键,看看属性。
Select your tomcat instance and Right click to see Properties.
现在选择连接选项卡。输入用户名为我和密码为合格。
Now select Connection Tab. Enter the "username" as me and "password" as pass.
这篇关于NetBeans的7.0.1:访问Tomcat服务器没有被授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!