• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Problem with Simple Facelet

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
<ice:outputText 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
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic