Resources
我的应用程序中未引用包含js
和css
文件的文件夹,这是我使用开发人员工具javax.faces.resource
获得的前端错误日志Chrome
GET http://demo:2008/javax.faces.resource/themes/sam/theme.css.jsp?ln=icefaces.ace 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/util/ace-components.js.jsp?ln=icefaces.ace 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/yui/yui-min.js.jsp?ln=yui/3_1_1&v=3068887 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/util/combined.css.jsp?ln=icefaces.ace 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/loader/loader-min.js.jsp?ln=yui/3_1_1&v=3068887 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/util/ace-jquery.js.jsp?ln=icefaces.ace 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/yui2-skin-sam-button/assets/button-core.css.jsp?ln=yui/2in3 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/combined.js.jsp?ln=org.icefaces.component.util&v=3068887 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/yui2-skin-sam-tabview/assets/tabview-core.css.jsp?ln=yui/2in3 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/combined.css.jsp?ln=org.icefaces.component.util 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/fileEntry.js.jsp?ln=org.icefaces.component.fileentry&v=3068887 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/slider/assets/slider-core.css.jsp?ln=yui/3_1_1 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/bridge.js.jsp?v=3068887 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/icefaces-compat.js.jsp 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/compat.js.jsp 404 (Not Found)
JobImport.jsp:246GET http://demo:2008/javax.faces.resource/jsf.js.jsp?ln=javax.faces&v=3068887 404 (Not Found)
JobImport.jsp:249Uncaught ReferenceError: ice is not defined
(anonymous function)JobImport.jsp:249
JobImport.jsp:250Uncaught ReferenceError: ice is not defined
(anonymous function)JobImport.jsp:250
JobImport.jsp:253Uncaught ReferenceError: ice is not defined
JobImport.jsp:254Uncaught ReferenceError: ice is not defined
是否有任何我们需要做的特定配置javax.faces.resources
在我们的应用程序中被正确引用?
更新:添加了 jsp、xhtml 和 web.xml 文件
这是我的jsp
页面
<html>
<head>
<!-- BEGIN SCRIPT TO OPEN RIGHT NOW HELP POPUP, THIS SCRIPT INCLUDES THE FUNCTION OPENRN-->
<%@ include file="/js/popupRightNow.inc" %>
<!-- END SCRIPT TO OPEN RIGHT NOW HELP POPUP, THIS SCRIPT INCLUDES THE FUNCTION OPENRN-->
<title>Test</title>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<jsp:include page="/navigation/TopNav.jsp" flush="true"/>
<jsp:include page="/entry/Upload.xhtml"/>
<!--BEGIN BOTTOM NAV -->
<jsp:include page="/navigation/BottomNav.jsp" flush="true"/>
<!--END BOTTOM NAV -->
</body>
</html>
这是我的xhtml
页面:
<?xml version='1.0' encoding='UTF-8' ?>
<h:head>
<title>ICEfaces 3</title>
<!-- <link rel="stylesheet" type="text/css" href="/xmlhttp/css/rime/rime.css"/> -->
</h:head>
<h:body>
<h:form id="form">
<h:outputText value="Welcome to ICEfaces 3, select current date: "/>
<ace:dateTimeEntry renderAsPopup="true">
<f:convertDateTime pattern="MM/dd/yyyy" timeZone="Canada/Mountain"/>
</ace:dateTimeEntry>
<ace:fileEntry id = "fileUpload"
label="File Entry"
relativePath="uploaded"
fileEntryListener="#{fileUpload.uploadFile}"/>
<h:commandButton value="Upload File" />
</h:form>
</h:body>
这是我的web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app >
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.concurrentDOMViews</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.blockingRequestHandler</param-name>
<param-value>icefaces</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.checkJavaScript</param-name>
<param-value>false</param-value>
</context-param>
<!-- filters.xml : Non-XDoclet filter declarations, merged into web.xml by XDoclet. -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
</web-app>