gpt4 book ai didi

jsf - 警告 : JSF1091: No mime type could be found for file QcFormDean. jsp,但等待它的 jsf 文件

转载 作者:行者123 更新时间:2023-12-04 17:09:50 25 4
gpt4 key购买 nike

我刚刚在我的库中添加了 jSTL-1.2.jar、JSF api 和 impl jars,以便这可以在我的 jsf xhtml 文件上运行。

<h:selectOneMenu value="#{qcFormBean.dliStickerValue}">
<f:selectItem itemValue="P" itemLabel="Pass or Not applicable" />
<f:selectItem itemValue="M" itemLabel="FAIL-Mechanical" />
<f:selectItem itemValue="E" itemLabel="FAIL-Electrical" />
<f:selectItem itemValue="C" itemLabel="FAIL-Cosmetic" />
<f:selectItem itemValue="S" itemLabel="FAIL-Software" />
<f:ajax event="change" execute="@this" render="perfbyDliSticker" />
</h:selectOneMenu>

<h:panelGroup id="perfbyDliSticker">
<h:selectOneMenu value="#{qcFormBean.performedByRoleID}"
rendered="#{!qcFormBean.dliStickerValue eq 'P'}">
<f:selectItem itemValue="A" itemLabel="Always" />
<f:selectItem itemValue="O" itemLabel="Often" />
<f:selectItem itemValue="S" itemLabel="Seldom" />
</h:selectOneMenu>
</h:panelGroup>

现在,当我尝试在 IE 上访问该页面时,出现 404 缺失错误,并且在 Tomcat 上出现以下错误,我不确定此时该怎么办,该错误将其作为 jsp 文件提及,我知道我正在制作此文件作为 jsf 文件,所以我不知道该怎么做。

Feb 05, 2014 3:05:50 PM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource WARNING: JSF1064: Unable to find or serve resource, /preQcFormDean.xhtml.

Feb 05, 2014 3:05:50 PM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource WARNING: JSF1064: Unable to find or serve resource, /preQcFormDean.view.xml.

Feb 05, 2014 3:05:50 PM com.sun.faces.context.ExternalContextImpl getMimeType WARNING: JSF1091: No mime type could be found for file /preQcFormDean.jsp. To resolve this, add a mime-type mapping to the applications web.xml.



这是我的 web.xml 文件。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>

<context-param>
<description>State saving method: 'client' or 'server' (default). See JSF Specification section 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>

<welcome-file-list>
<welcome-file>index.jsf</welcome-file>
<welcome-file>welcome.jsf</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>

这是 lib 文件夹中的 jar 文件
javax.faces.jar 
jsf-api.jar
jstl-1.2.jar
jsf-impl.jar

最佳答案

尝试在 web.xml 中添加以下几行

<mime-mapping>
<extension>xhtml</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>

关于jsf - 警告 : JSF1091: No mime type could be found for file QcFormDean. jsp,但等待它的 jsf 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21587417/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com