如何为NetBeans设置Tomcat Manager应用程序用户名和密码? [英] How do I set Tomcat Manager Application User Name and Password for NetBeans?

查看:116
本文介绍了如何为NetBeans设置Tomcat Manager应用程序用户名和密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照教程在NetBeans中创建一个非常基本的Java Web应用程序。

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

当我尝试运行它时,会出现一个对话框标题需要验证。在对话框内有标题Tomcat Manager Application和User Name和Password字段。

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

包括以下内容:

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

所以我已经这样做了,但它还没有帮助。

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

任何人都可以提供一些见解吗?我正在使用Tomcat 6.0.20,NetBeans 6.7.1和Windows Vista。我正在使用jdk1.7.0,但Java还没有真正进入这个项目。

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.

推荐答案

当你发布时来自netbeans IDE的tomcat服务器你需要在tomcat服务器的连接选项卡上检查菜单tools-> servers - 有catalina基目录。您需要包含以下内容:

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

或使用用户名由IDE自动生成,描述已经放在此文件或连接选项卡上

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

对于经理应用程序:GUI访问

<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>

这篇关于如何为NetBeans设置Tomcat Manager应用程序用户名和密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆