Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8268891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:02:53+00:00 2026-06-08T06:02:53+00:00

Hi folks I am in very strange problem.I have created a client template facelet

  • 0

Hi folks I am in very strange problem.I have created a client template facelet and template facelet.but when i run my web page it will not insert the defined tag.I mean not working.Here is my code
insert.xhtml:

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
   <title>facelet example </title>
</head>
<body> 
  <ui:insert name="face1"> </ui:insert>
  <ui:insert name="face2"> </ui:insert>
  <ui:insert name="face3"> </ui:insert>
  <ui:insert name="face4"> </ui:insert>
</body>
</html>

compose.xhtml:

<!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:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html">
<body>
   <ui:composition template="insert.xhtml">
   <ui:define name="face1">
   <center><h2>Facelet</h2></center>
   <h3>Welcome to the Facelet world..........</h3>
  </ui:define>
  <ui:define name="face2">Enter UserID :<br/>
   <h:inputText id="it" /><br/><br/>
   </ui:define>
   <ui:define name="face3">Enter Password :<br/>
   <h:inputSecret id="is" /><br/><br/>
   </ui:define>
  <ui:define name="face4">
   <h:commandButton id="b" value="Submit" />
  </ui:define>
   </ui:composition>
</body>
</html>

but when i use <include src="compose.xhtml"> tag in insert.xhtml then it shows the complete facelet.But include tag only works if i write like this

<insert name="face1">
<include src="compose.xhtml"/>
</insert>

if I remove insert tag before include then include also don’t work.I am sick from this strange behaviour of JSF 2.0 facelets.Please help me
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:02:56+00:00Added an answer on June 8, 2026 at 6:02 am

    First of all you need to understand that in tag “template” attribute is optional so it means there is a little mistake in your code.As you know that facelet will include only portion between tag so

    xmlns="http://www.w3.org/1999/xhtml" 
       xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html"
    

    this should come with composition not with in html tag.
    Your question resembles to this question.I hope this will also help you.
    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might seem like a very easy question for some of you folks, but
This may not be very technical, but in my application I want to prompt
I am running into a very strange situation with an app I have that
Hi folks hi have a very interesting situation. i have a viewmodel that requires
Folks, I know I didn't phrase that title very well, but here's the scenario.
I'm beginning to design a web-based API and the very first issue—how will users
Folks, i have the following problem. My website uses an iframe to select an
Sorry folks but I asked a question earlier and perhaps did not explain myself
hi folks I faced a very strange while creating my JAXB parser. When i
folks! I have project in cc.net and this project nay start by 3 ways

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.