我在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