wood burning stoves 2.0*
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
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with Simple Facelet " Watch "Problem with Simple Facelet " New topic
Author

Problem with Simple Facelet

Sangeetha Raja
Greenhorn

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

faceletTest.jsp


Getting error:
JSPG0047E: Unable to locate tag library for uri http://java.sun.com/jsf/facelets

Root Cause:com.ibm.ws.jsp.JspCoreException: JSPG0047E: Unable to locate tag library for uri http://java.sun.com/jsf/facelets at com.ibm.ws.jsp.translator.visitor.tagfiledep.TagFileDependencyVisitor.visitCustomTagStart(TagFileDependencyVisitor.java:74) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:267) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:309) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:139) at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121) at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:121) at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:181) at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:83)



faces-config.xml has;


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

Vishal Kumar Aruru
Greenhorn

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

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:ui="http://java.sun.com/jsf/facelets">

<html>
<head>
<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>
</head>

<body>

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

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

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



</body>
</html>

</jsp:root>


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

<jsp:root xmlns:ice= “http://www.icesoft.com/icefaces/component”
xmlns:ui= “http://java.sun.com/jsf/facelets” >
</jsp:root>




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">
<f:view>
<ice:form>
<iceutputText value=”welcome to Facelets”/>
</ice:form>
</f:view>
</ui:define>
</ui:composition>


5. Include following code in faces-config.xml

<application>
<view-handler>
com.icesoft.faces.facelets.D2DFaceletViewHandler
</view-handler>
</application>


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






Sangeetha Raja
Greenhorn

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?
 
 
subject: Problem with Simple Facelet