我正在使用IBM RAD 8.5.1创建一个 JSF 2 项目并在websphere 8.5上运行它
我使用了文件 > 新建 > Web 项目向导 ,并添加了 JSF 和 Primefaces,如下所示:
Java 构建路径 > 添加外部 Jar
- jsf-api-2.1.7.jar (com.sun.faces)
- jsf-impl-2.1.7.jar (com.sun.faces)
- primefaces-3.3.1.jar
项目方面是:
- 动态网页模块 3
- Java 1.6
- JavaScript 1
- JavaServer Faces 2
- JSTL 1.1
- WebSphere Web(共存)8.5
- WebSphere Web(扩展)8.5
xhtml页面:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:p="http://primefaces.org/ui"
xmlns:pretty="http://ocpsoft.com/prettyfaces"
xmlns:sec="http://www.springframework.org/security/tags"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
<title> Welcome </title>
</h:head>
<h:body>
<p:layout fullPage="true">
<p:layoutUnit position="north" size="100" header="Top" resizable="true" closable="true" collapsible="true">
<h:outputText value="North unit content." />
</p:layoutUnit>
<p:layoutUnit position="south" size="100" header="Bottom" resizable="true" closable="true" collapsible="true">
<h:outputText value="South unit content." />
</p:layoutUnit>
<p:layoutUnit position="west" size="200" header="Left" resizable="true" closable="true" collapsible="true">
<h:outputText value="West unit content." />
</p:layoutUnit>
<p:layoutUnit position="east" size="200" header="Right" resizable="true" closable="true" collapsible="true" effect="drop">
<h:outputText value="Right unit content." />
</p:layoutUnit>
<p:layoutUnit position="center">
<h:form>
This fullPage layout consists of five different layoutUnits which are resizable and closable by default.
</h:form>
</p:layoutUnit>
</p:layout>
</h:body>
</html>
网页.xml:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>vip</display-name> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> <enabled>true</enabled> <async-supported>false</async-supported> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern> /faces/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file> pages/hello.xhtml </welcome-file> </welcome-file-list> </web-app>
在 IE 9 上运行项目时,primefaces 组件未呈现,我只获取中心layoutUnit的文本
请告知如何解决这个问题,谢谢。