problem with getting start with primefaces

UI Components for JSF
Post Reply
riadhhwajdii
Posts: 10
Joined: 14 Aug 2009, 09:52

17 Aug 2009, 09:57

hi i am trying to get start with primefaces
i copied all the jar in my lib folder
my web.xml is:

Code: Select all

<?xml version="1.0"?>
<web-app version="2.5" 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_2_5.xsd">
	<display-name>firstPrimefaces</display-name>
	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>server</param-value>
	</context-param>
	<listener>
		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
	</listener>
	<!-- Faces Servlet -->
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<!-- Faces Servlet Mapping -->
	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.jsf</url-pattern>
	</servlet-mapping>
	<login-config>
		<auth-method>BASIC</auth-method>
	</login-config>
	<servlet>
		<servlet-name>Resource Servlet</servlet-name>
		<servlet-class>org.primefaces.ui.resource.ResourceServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>Resource Servlet</servlet-name>
		<url-pattern>/primefaces_resources/*</url-pattern>
	</servlet-mapping>
</web-app>

and there is my web page testPrimfaces.jsp:

Code: Select all

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://primefaces.prime.com.tr/ui" prefix="p" %>
<html>
   <head>
      <p:resources/>
   </head>
   <body>
      <f:view>
         <h:outputText value="Teste" />
         <p:editor/>
      </f:view>
   </body>   
</html>  
but when running this example with eclipse i get 404 error:

Code: Select all

Etat HTTP 404 - 

--------------------------------------------------------------------------------

type Rapport d'�tat

message 

description La ressource demand�e () n'est pas disponible.


can you help me please?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 Aug 2009, 11:53

<f:view> should include p:resources as well. So it should be;

Code: Select all

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://primefaces.prime.com.tr/ui" prefix="p" %>
<html>
    <f:view>
       <head>
          <p:resources/>
       </head>
       <body>
             <h:outputText value="Teste" />
             <p:editor/>
       </body>
     </f:view>   
</html> 

riadhhwajdii
Posts: 10
Joined: 14 Aug 2009, 09:52

17 Aug 2009, 12:11

cagatay.civici wrote:<f:view> should include p:resources as well. So it should be;

Code: Select all

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://primefaces.prime.com.tr/ui" prefix="p" %>
<html>
    <f:view>
       <head>
          <p:resources/>
       </head>
       <body>
             <h:outputText value="Teste" />
             <p:editor/>
       </body>
     </f:view>   
</html> 
i have changed<f:view> but there is always a 404 error

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 Aug 2009, 12:53

How do you access your page? testPrimfaces.jsf? Can you access any other JSF page?

riadhhwajdii
Posts: 10
Joined: 14 Aug 2009, 09:52

17 Aug 2009, 13:36

right clic on the page --->run on server

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests