Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JSF and the fly likes Problem with Simple Facelet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with Simple Facelet " Watch "Problem with Simple Facelet " New topic

Problem with Simple Facelet

Sangeetha Raja

Joined: Dec 18, 2008
Posts: 28
I am trying to use facelet in my Jsp.


Getting error:
JSPG0047E: Unable to locate tag library for uri

Root JSPG0047E: Unable to locate tag library for uri at at at at at at at at

faces-config.xml has;

Any one of you please help me to fix this issue.

Vishal Kumar Aruru

Joined: May 18, 2009
Posts: 8
1. Create a layout.jspx page by including following code.

<jsp:root xmlns:jsp="" version="2.0"

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="default.css" rel="stylesheet" type="text/css" />
<link href="cssLayout.css" rel="stylesheet" type="text/css" />
<title>Facelets Template</title>


<div id="top">
<ui:insert name="top">Header</ui:insert>

<div id="content">
<ui:insert name="content">Content</ui:insert>

<div id="bottom">
<ui:insert name="bottom">Footer</ui:insert>



2. Create a new JSP Page and add the following taglibraries in addition to existing core and html tag libraries.

<jsp:root xmlns:ice= “”
xmlns:ui= “” >

3. Use the above layout file in JSP Page using <ui:composition> component.

<ui:composition template=layout.jspx"></ui:composition>

4. Change the content part of main page using <ui:define> component. Place this component inside <ui:composition>.

<ui:composition template="layout.jspx">
<ui:define name="content">
<iceutputText value=”welcome to Facelets”/>

5. Include following code in faces-config.xml


6. Add Dependency for following jars
1. el-ri.jar
2. el-api.jar
3. icefaces-facelets.jar
4. servlet-api.jar

Sangeetha Raja

Joined: Dec 18, 2008
Posts: 28
I tried this....

I a, gettign error in faces-config;

com.icesoft.faces.facelets.D2DFaceletViewHandler must be implementation of the abstract class javax.faces.application.ViewHandler. Any idea how to fix this?
I agree. Here's the link:
subject: Problem with Simple Facelet
It's not a secret anymore!