[問題] 請問 Servlet 的 web.xml 的 icon元素???
我根據書本以及網路很多前輩上的方法
想要為我的Servlet放置 small-icon ==>據說這樣在瀏覽器的URL左邊就會有自訂的小圖示????
但是我試了老半天 怎樣都秀不出來 還煩請真的實際試過成功的前輩指導一下,我是否忽略了什麼....3Q ^^
以下是我的方法 ^^^^^^^^^^^^^
1.我的 Servlet(命名:ss) 的對應網路位址並可直接正常get到內容: http://localhost:8080/Test123/ss
(Test123=> 為Webcontent file root實際路徑位於電腦內的
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Test123 )
2.icon檔名為123.gif (已修成16*16大小),並放在 Test123\images\內
3.Test123\WEB-INF\web.xml檔內容如下:
.............................................................................
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee " rel="nofollow">http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Test123</display-name>
<servlet>
<description> </description>
<display-name>ss</display-name>
// 以下3行是我加入的 small-icon及路徑
<icon>
<small-icon>/images/123.gif</small-icon>
</icon>
<servlet-name>ss</servlet-name>
<servlet-class>com.ss</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ss</servlet-name>
<url-pattern>/ss</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 124.8.13.210
推
01/18 12:07, , 1F
01/18 12:07, 1F
→
01/18 12:08, , 2F
01/18 12:08, 2F
→
01/18 12:45, , 3F
01/18 12:45, 3F
→
01/18 12:47, , 4F
01/18 12:47, 4F
推
01/18 15:59, , 5F
01/18 15:59, 5F