我在JSF中構建一個頁面,並在Eclipse中的Tomcat上運行它。一切工作都很好,直到我每次嘗試加載頁面時都開始出現這些錯誤。頁面看起來錯誤和Eclipse控制檯錯誤的大約12表明我像這樣的:Tomcat JSF錯誤
Dec 19, 2013 9:23:26 PM com.sun.faces.context.ExternalContextImpl getMimeType
WARNING: JSF1091: No mime type could be found for file /img/sep.jsp.
To resolve this, add a mime-type mapping to the applications web.xml.
有趣的是,在此特定錯誤的心不是sep.jsp但sep.PNG文件...
<?xml version='1.0' encoding='UTF-8' ?>
<!-- index.xhtml -->
<!-- JSF page that displays the current time on the web server -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>WebTime: A Simple Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</h:head>
<h:body>
<h1>Current time on the web server: #{webTimeBean.time}</h1>
<img src="img/sep.png" alt="sep.png" style="width:200px; height:200px;
float:right;" />
</h:body>
</html>
請貼出您的頁面的源代碼 – tmandry
這是它,我刪除了那些不重要的東西,我得到了我放入頁面的每張圖片的錯誤... – Pero44