小编sph*_*ere的帖子

使用tomcat客户端部署程序进行部署时出现403错误

使用本地安装的Tomcat客户端部署程序(TCD)时遇到一些麻烦。具体来说,在尝试部署一个简单的helloworld Web应用程序时收到403错误,这导致我得出结论,即tomcat-users.xml不太正确。

我只是看不到它是什么。

这是相关的build.xml代码段:

<!-- Configure the folder and context path for this application -->
<property name="webapp"   value="helloworld"/>
<property name="path"     value="/helloworld"/>
<!-- Configure properties to access the Manager application -->
<property name="url"      value="http://localhost:8080/manager/text"/>
<property name="username" value="deploymgr"/>
<property name="password" value="s3cret"/>
Run Code Online (Sandbox Code Playgroud)

tomcat-users.xml:

</tomcat-users>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <role rolename="tomcat"/>
  <user username="deploymgr" password="s3cret" roles="manager-script"/>
  <user username="tomcat" password="tomcat" roles="tomcat, manager-gui, manager-jmx, manager-status"/>
</tomcat-users>
Run Code Online (Sandbox Code Playgroud)

deployer.properties:

build=D:/apache-tomcat-7.0.16-deployer/work
webapp=D:/apache-tomcat-7.0.16-deployer/helloworld/
path=/helloworld
url=http://localhost:8080/manager
username=deploymgr
password=s3cret
Run Code Online (Sandbox Code Playgroud)

当我尝试部署应用程序时,出现以下错误消息:

D:\apache-tomcat-7.0.16-deployer>ant deploy
Buildfile: D:\apache-tomcat-7.0.16-deployer\build.xml
Trying to override old definition …
Run Code Online (Sandbox Code Playgroud)

deployment tomcat7

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

deployment ×1

tomcat7 ×1