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

  • Home
  • SEARCH
  • 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 6747239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:25:05+00:00 2026-05-26T12:25:05+00:00

I want to use Facelets to build a static HTML prototype. This prototype will

  • 0

I want to use Facelets to build a static HTML prototype. This prototype will be sent out to people who do not have a running web application server such as Tomcat. Is there some way to compile a Facelets site at build-time (using Ant etc) into a set of flat HTML files?

In the simplest case we have two facelets like this:

<!-- layoutFacelet.xhtml -->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:insert name="content" />
</ui:composition>

<!-- implementationFacelet.xhtml -->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  template="layoutFacelet.xhtml">
    <ui:define name="content">
        HELLO WORLD
    </ui:define>
</ui:composition>

The output would be a single html (e.g. “implementationFacelet.output.html”) like:

HELLO WORLD

In other words, Facelets is running at build-time rather than render-time, in order to produce static flat-file prototypes.

  • 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-05-26T12:25:06+00:00Added an answer on May 26, 2026 at 12:25 pm

    I’m not sure about any ready to use solution for your problem. However I have a rather good idea how it could be implemented thanks to working on a build-time JSF EL validator, where I’m currently adding support for facelets. I’d do this:

    1. Set up the backing beans etc. used in EL expressions – there are multiple ways to do it, I’d personally consider pluging in my “value faking EL resolver” but you may equally well just make sure that JSF can find your backing beans and somewhow ensure all the values needed are set
    2. Compile a view manually and build its component tree (implemented – see ExperimentalFaceletsElFinder.verifyExpressionsViaComponentTree)
    3. Render the component tree to HTML via UIViewRoot.encodeAll(context) – see org.apache.myfaces.view.facelets.FaceletViewHandler#renderView

    So this is feasible but perhaps too much work for somebody who hasn’t been working with these things before. Once I’m done with my Facelets support, I’ll consider adding such functionality to the validator as it would be quite easy for me then.

    Best regards, Jakub

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

Sidebar

Related Questions

i want use some data from a website with web service. i have a
I have a transaction log file in CSV format that I want use to
I want to use the MultipleLookupField control in a web page that will run
i want to use The Spring Security Facelets tag library to secure my UI
I want use ORDER BY RAND() query mysql. But I have some question want
I need to use HTML comments to store specific data, but I don't want
I use primefaces with facelets and i have a quastion: for example i have
I want to use JSF with Facelets/JSP in my website. Can I get Java
I use JSF 2.0 and facelets. I want to login check at each page
I want use A-Z buttons on a html page like shown below (only sample

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.