玩转Tomcat高级篇


本文示例Tomcat版本:Tomcat 7.0


1、查看Tomcat性能状态(简洁版)

 步骤一:打开Tomcat安装目录(假设是D:\Program Files\Apache Software Foundation\Tomcat 7.0 )  --> conf目录 --> 打开 tomcat-users.xml文件,配置如下:

<?xml version='1.0' encoding='gbk'?>
<tomcat-users>
<!--
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="tomcat" password="tomcat" roles="manager-script"/>
<user username="tomcat" password="tomcat" roles="manager-jmx"/>
<user username="tomcat" password="tomcat" roles="manager-status"/>
-->

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

</tomcat-users>

Note:Tomcat7.0只可配置以上4种角色(role),分别是:

[1] manager-script : allows access to the HTML GUI and the status pages 

[2] manager-script :allows access to the text interface and the status pages

[3] manager-jmx :allows access to the JMX proxy and the status pages 

[4] manager-status :allows access to the status pages only 

步骤二:打开 http://localhost:8080/manager/status,输入上述配置的用户名和密码,进入status页面,如下图所示:



2、修改网址图标

步骤:打开Tomcat安装目录(假设是D:\Program Files\Apache Software Foundation\Tomcat 7.0 )  -->webapps目录 --> ROOT目录 --> 替换favicon.ico图标即可

Note:Tomcat首先会先从访问的项目目录下查看是否有favicon.icon图标,如果没有的话,会去webapps/ROOT目录下查找favicon.icon图标,如果这两个地方都没有的话,直接使用IE图标。还需注意,替换完成后,必须清空浏览器缓存及历史记录,重启服务器不一定会及时生效。

效果如图所示:



本文地址:http://blog.csdn.net/chen_zw/article/details/18923761


Note:本文只是先挖个坑,稍后填上,敬请期待。。


发布了109 篇原创文章 · 获赞 101 · 访问量 216万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章