小编jso*_*639的帖子

Eclipse Facelets项目中无法识别Primefaces标记

我正在尝试制作一个简单的PrimeFaces示例,例如他们网站上的教程.我基本上和这个用户有完全相同的问题,但我没有像他那样的空jar文件.h:标签渲染正常,但p:标签在HTML中显示为p:标签.PrimeFaces 3.1.1和3.2也存在同样的问题.这是我的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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>jsf</display-name>
  <welcome-file-list>
    <welcome-file>Login.xhtml</welcome-file>
  </welcome-file-list>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
 </context-param>
  <context-param>
    <description>State saving method: 'client' or 'server' (=default). See JSF    Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
  </context-param>
  <context-param>
    <description></description>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
  </context-param>
<context-param>
<description></description>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>
  <context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
  <description></description>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
</context-param>
<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-  class>
</listener>
<servlet>
  <servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
 <servlet-name>Faces Servlet</servlet-name>
 <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
</web-app>
Run Code Online (Sandbox Code Playgroud)

我的XHTML文件看起来像这样.

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html" 
  xmlns:p="http://primefaces.org/ui">
<h:head> …
Run Code Online (Sandbox Code Playgroud)

eclipse facelets primefaces jsf-2

0
推荐指数
1
解决办法
5380
查看次数

标签 统计

eclipse ×1

facelets ×1

jsf-2 ×1

primefaces ×1