`
maosuhan
  • 浏览: 113917 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

关于netbeans6.7 中tomcat的配置

阅读更多
我用的操作系统是win7。tomcat版本为6.0.20,netbeans版本为6.7。
先是配置tomcat,那些classpath,path我就不讲了。当然还得在netbeans中激活一下tomcat,在工具--服务器里。
但是当我部署的时候有一个问题,它让我输入验证的用户名与密码。上网查了一些资料。
我用的tomcat是独立的,在tomcat目录下的conf\tomcat-user.xml.
<?xml version='1.0' encoding='utf-8'?>
<!--
  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>
<!--
  <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>



发现role中没有admin与manager,于是添加进这两个角色,再依葫芦画瓢定义自己的用户名与密码。记得要把<tomcat-user>内的注释删掉。
<?xml version='1.0' encoding='utf-8'?>
<!--
  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>

  <role rolename="tomcat"/>
<role rolename="admin"/>
  <role rolename="role1"/>
<role rolename="manager"/>
 <user username="tomcat" password="tomcat" roles="tomcat"/>  <user username="name" password="password" roles="manager,admin"/> <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>

</tomcat-users>


接着在netbeans中的工具--服务器--tomcat6.0中把自己刚才设的用户名与密码输进去,这样就就不用每次都输密码了。

0
1
分享到:
评论
2 楼 2001430 2010-10-13  
没用!!!
要在.netbean目录下的tomcat的conf下的tomcat-user.xml下配置。
1 楼 jklmnlkevin 2010-04-17  
我也为这个问题弄了很久,后才终于弄好了,原来如果更改了tomcat的设置的话,必须重启一下tomcat,新的设置才会生效。这点很无语。

相关推荐

    struts2 for netbeans 6.7

    在Struts2 for NetBeans 6.7这个主题中,我们可以深入探讨以下几个关键知识点: 1. **Struts2框架核心概念**:Struts2的核心组件包括Action、Result、Interceptor和ValueStack。Action是业务逻辑的载体,Result负责...

    NetBeansIDE 6.7的安装与使用

    下面是关于 NetBeans IDE 6.7 的安装和使用的知识点总结: 一、JDK 的下载与安装 * 在安装 NetBeans IDE 之前,需要先安装好 JDK(Java Development Kit) * 可以到 Sun 公司的官方网站下载 JDK6,网址:...

    NetBeans+IDE开发工具的安装与使用.pdf

    安装完成后,双击桌面图标启动NetBeans 6.7。首次启动可能会加载一些模块,加载完毕后,你会看到NetBeans的起始页。如果你想以后不再显示这个页面,可以取消勾选相关选项。 NetBeans的界面布局清晰,主要包括主菜单...

    NETBEAN6.7的安装图解

    1. 访问NetBeans官方网站http://www.netbeans.org,下载netbeans-6.7-ml-windows.exe安装文件。 2. 双击执行安装文件,进入安装向导。 3. 在自定义安装界面,可以根据需求选择安装组件。例如,如果你仅需开发JSP程序...

    开源软件之道.part2of2

    9.2 netbeans 122 9.3 apache ant 124 9.4 apache maven 126 9.5 cvs 128 9.6 subversion 130 9.7 git 131 9.8 bugzilla 133 9.9 junit 135 9.10 testng 137 第10章 开源软件之桌面应用 139 10.1 gnome 139 10.2 ...

Global site tag (gtag.js) - Google Analytics