I am developing a web application, and I am going to use some jsf in it. Since I am not fammiliar with it I decided to write simple Hell World application for the beginning. The problem is it returns a blank page, it shows the name of a page on the tab of a browser - but it does not show Hello World message! What is weird - before that I was getting different errors and exeptions - but now just blank page! I searched for some solutions and they did not apply to me, really dond know what it might be... Any help greatly appriciated!!!
web.xml
<?xml version='1.0' encoding='UTF-8'?>
<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>JSF Made Easy</display-name>
<servlet id="JSF_Front_Controller_Servlet">
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>
faces-config.xml
<?xml version="1.0"?>
<faces-config 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-facesconfig_2_0.xsd"
version="2.0">
</faces-config>
hello.jsp (or xhtml - tried both)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>Simple JSF Page - xhtml</title>
</h:head>
<body>
<h:outputText value="Hello World!"/>
</body>
</html>
This post has been edited by Andreika_86: 13 March 2012 - 02:11 PM

New Topic/Question
Reply


MultiQuote



|