java.lang.SecurityException:Servlet of class org.apache.catalina.servlets.InvokerServlet is privileged

來源:互聯網
上載者:User

標籤:

轉自:http://www.cnblogs.com/orientsun/archive/2012/11/04/2753270.html

Error:

java.lang.SecurityException:Servlet of class org.apache.catalina.servlets.InvokerServlet is privileged

Description:

在啟動tomcat的時候發生上面錯誤,之前我在Web項目中引入了串連池,對tomcat的server.xml和context.xml進行了修改。

Accuse:

在網上找到的原因是在Tomcat中,如果想使用Servlet調用器 (org.apache.catalina.servlets.InvokerServlet),要在conf/web.xml中,把調用器這個 servlet的註冊和映射開啟來。

因為我在tomcat容器中使用了資料庫連接池,恰好串連池需要Servelt調用器(org.apache.catalina.servlets.InvokerServlet),而我恰恰沒有開啟。

Action:

修改conf/context.xml檔案,新加兩個屬性,開啟Servelt調用器即可。

<Context  reloadable=”true” privileged=”true”><!– Default set of monitored resources –><WatchedResource>WEB-INF/web.xml</WatchedResource></Context>

 

java.lang.SecurityException:Servlet of class org.apache.catalina.servlets.InvokerServlet is privileged

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.