1. 程式人生 > >TOMCAT "Access to the requested resource has been denied" 的解決辦法

TOMCAT "Access to the requested resource has been denied" 的解決辦法

type Status report

messageAccess to the requested resource has been denied

descriptionAccess to the specified resource (Access to the requested resource has been denied) has been forbidden. 原因:缺少配置一個引數;開啟主目錄下/conf/tomcat-users.xml 檔案,因該在在其中加上一個使用者,並加上roles="manager"以下是一個示例添加了admin,和root,兩個使用者,用這兩個使用者登陸就沒有錯誤了

<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="111111" roles="admin,manager"/>
<user username="root" password="root" roles="admin,manager"/>
</tomcat-users>  當然 如果你沒有安裝admin包 那麼需要去下載admin包 預設不帶的 我的測試環境是tomcat 5.5.17

相關推薦

TOMCAT "Access to the requested resource has been denied" 的解決辦法

type Status report messageAccess to the requested resource has been denied descriptionAccess to the specified resource (Access to the requested resource h

solr部署tomcat 訪問HTTP Status 403 – Access to the requested resource has been denied

height AC target win7 denied erl 重啟 出現 ora -----------解決403錯誤看這裏!!-----------打開****\Tomcat 8.5\webapps\solr\WEB-INF裏面的web.xml,把下面這段配置註釋掉!

struts2下無法用直接通過路徑訪問.jsp的頁面:HTTP Status 403 - Access to the requested resource has been denied

struts2下無法用直接通過路徑訪問.jsp的頁面 http://localhost:8081/struts2_020/index.jsp 訪問會出錯,   HTTP Status 403 - Access to the requested resource has be

Post request is No 'Access-Control-Allow-Origin' header is present on the requested resource跨域問題解決

跨域問題 報錯資訊為:post request is No ‘Access-Control-Allow-Origin’ header is present on the requested resou

PHP的環境搭建(艱辛搭配經歷,最後終於搭建好了。HTTP Error 404. The requested resource is not found.解決方法之一)

PHP的環境搭建(艱辛搭配經歷,最後終於搭建好了) HTTP Error 404. The requested resource is not found.解決方法之一 最近開始學習PHP,一開始配置了一個晚上的環境,但是總是有一點不那麼滿意,於是乎卸了換,換了再安裝,再解

beyond compare 4 This license key has been revoked 解決辦法

錯誤提示:This license key has been revoked xxxxx 即: 解決方法: 刪除以下目錄中的所有檔案即可。 C:\Users\Administrator\AppData\Roaming\Scooter Software\Beyond C

DOCKER push失敗:denied: requested access to the resource is denied

剛剛入坑,第一次push映象失敗, 原因1:命令內容無帳號資訊 E:\docker\jdk8>docker push ubuntu:16-jdk8 The push refers to a repository [docker.io/library/ubuntu]

Docker:釋出自己映象問題denied: requested access to the resource is denied解決方法

問題:    釋出映象的時候,按照教程執行的,結果沒有成功,搜了下,找到解決方法了,記錄一下。    denied: requested access to the resource is denied解決方法:看到這個,只好搜尋了。還好,有不少帖子都有。看看下面我的執行步驟

No 'Access-Control-Allow-Origin' header is present on the requested resource

請求 ted -c ref aliyun 跨域 sent res 服務器的響應 一、現象 ajax調用請求後,前端提示收到這個錯誤 No ‘Access-Control-Allow-Origin‘ header is present on the requested res

[轉]No 'Access-Control-Allow-Origin' header is present on the requested resource.'Ajax跨域訪問解決方案

不能 ade 方式 ole 相同域名 all log head 允許 原 https://blog.csdn.net/zhoucheng05_13/article/details/53580683 No ‘Access-Control-Allow-Origin‘ heade

Ajax跨域請求No 'Access-Control-Allow-Origin' header is present on the requested resource

背景 安裝完nodejs並使用React傳送Ajax請求時,日誌列印No ‘Access-Control-Allow-Origin’ header is present on the requested resource。 解決方案 之前的部落格中的專案存在SessionFilt

解決Vue請求 ‘No 'Access-Control-Allow-Origin' header is present on the requested resource’錯誤

如果我們用VueResouce直接請求,這樣寫(以豆瓣api為例): this.$http.get('https://api.douban.com//v2/movie/top250').then((response) => { this.movie =

No 'Access-Control-Allow-Origin' header is present on the requested resource.'Ajax跨域訪問解決方案

出現該錯誤是由於存在網站跨域訪問的問題。 什麼是網站跨域,簡單來講,當你通過ajax來請求或傳送資料時,兩個域名之間不能跨過域名來發送請求或者請求資料,瀏覽器會認為它是不安全的。 解決方式: 1、伺服器端解決方案 設定響應報文頭 response.setHeader

Cesium載入傾斜攝影模型,cors跨域的問題No 'Access-Control-Allow-Origin' header is present on the requested resource

    用Cesium載入傾斜攝影模型時,會存在cors跨域的問題,報No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:

No ‘Access-Control-Allow-Origin’ header is present on the requested resource 報錯原因及解決方案

跨域——Cross-Origin Resource Sharing 跨域請求:簡單說,不同域名之間可以請求到資料的行為; 報錯資訊: Failed to load https://example.com/: No ‘Access-Control-Allow-O

警告: A docBase D:\apache-tomcat-6.0.53\webapps\webapps\projectname inside the host appBase has been

在使用Eclipse,部署專案到自己下載的Tomcat的時啟動Servers服務時候,會出現這個警告 錯誤原因:1.假設要部署工程 "WEE"(自己命名的一個專案名),放到了${catalina.h

VUE開發報錯之No 'Access-Control-Allow-Origin' header is present on the requested resource.

近來被領導安排去做前端幫忙,使用的是VUE+elementUI。今天完成修改密碼功能時,出現如下問題:Failed to load http://xxxxxxxxx/motifyUserPwd: No 'Access-Control-Allow-Origin' header

jFinal解決跨域問題 No 'Access-Control-Allow-Origin' header is present on the requested resource

前端ajax請求後端java實現跨域問題,看了很多方法說前端這是jsonp什麼的並沒有解決, $.ajax({ type:"post", url:"http://sdfgadsgfasdg

本地Ajax跨域訪問 No 'Access-Control-Allow-Origin' header is present on the requested resource.

XMLHttpRequest cannot load http://lefeier.net/storemessage.php. No ‘Access-Control-Allow-Origin’ header is present on the request

No 'Access-Control-Allow-Origin' header is present on the requested resource', 跨域訪問的解決方法

1. 當請求不在同一域名下的資原始檔(ip地址+埠號)時,會報如下錯誤: “No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://