i have done all the things that i fond on net but they didn't covert it with example here is my web.xml
Code: Select all
<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">
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<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>/faces/*</url-pattern>
</servlet-mapping>
<!-- Configuration part for the Primefaces-->
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>
org.primefaces.resource.ResourceServlet
</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/primefaces_resources/*</url-pattern>
</servlet-mapping>
<!-- End of the configuration part for the Primefaces-->
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/welcomeJSF.jsp</welcome-file>
</welcome-file-list>
</web-app>
Code: Select all
<%--
Document : Login
Created on : Dec 3, 2009, 11:37:28 AM
Author : Christopher Lam
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="p" uri="http://primefaces.prime.com.tr/ui" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<body>
<center><br><br><br>
<h2><h:outputText value="Please Login"/></h2>
<form action="j_security_check">
<p:panel header="Login Window" footer="Visca el Barca!">
<h:panelGrid columns="2" bgcolor="#eff5fa" cellspacing="5" frame="box">
<h:outputLabel value="User ID:"/>
<h:inputText id="j_username" tabindex="1" />
<h:outputLabel value="Password:"/>
<h:inputSecret id="j_password"/>
<h:outputLabel value=""/>
<h:commandButton id="login" value="Login"/>
</h:panelGrid>
</p:panel>
<p:breadCrumb preview="true">
<p:menuitem label="Categories" url="#" />
<p:menuitem label="Sports" url="#" />
<p:menuitem label="Football" url="#" />
<p:menuitem label="Countries" url="#" />
<p:menuitem label="Spain" url="#" />
<p:menuitem label="F.C. Barcelona" url="#" />
<p:menuitem label="Squad" url="#" />
<p:menuitem label="Lionel Messi" url="#" />
</p:breadCrumb>
</form>
</center>
</body>
</html>
</f:view>
<%
session = request.getSession(true); //Force to create a new session
%>
in my above code there is no error
but i am not able to achieve characteristic of primefaces
when i run application just behave normally there is no effect of css or js for event