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 3235278
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:29:18+00:00 2026-05-17T17:29:18+00:00

I have a client who wants to use JSF2 and they like that XHTML

  • 0

I have a client who wants to use JSF2 and they like that XHTML is now the default (Facelets).

However, they have a huge amount of “legacy” JSP from their JSF1.x codebase.

I know it’s probably not desirable, but will it be possible to support a mix of both in JSF2, at least for a transition period whilst they port?

I know it was possible to mix the two in JSF1.x, but I can’t find any information about this in JSF2.

I’ve googled hard but naturally all the JSF2 focus is on Facelets. Also my brief attempt at mixing (I’m not an expert at JSF!) has led to failure.

  • 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-17T17:29:18+00:00Added an answer on May 17, 2026 at 5:29 pm

    This is answered in the Facelets FAQ: use prefix mapping on FacesServlet. You can then access JSP pages by http://example.com/faces/page.jsp and Facelets pages by http://example.com/faces/page.xhtml. Here’s a cite of relevance:

    How do I use Facelets and JSP in the same application?

    You have to use prefix mapping for the Facelets pages in order for this to work. Leave the DEFAULT_SUFFIX with the JSF default of .jsp. Configure the Facelet’s VIEW_MAPPINGS parameter:

    <web-app>
        <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
            <param-value>.jsp</param-value>
        </context-param>
    
        <!-- Facelets pages will use the .xhtml extension -->
        <context-param>
            <param-name>facelets.VIEW_MAPPINGS</param-name>
            <param-value>*.xhtml</param-value>
        </context-param>     
    
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        </servlet>
    
        <!-- Use prefix mapping for Facelets pages, e.g. http://localhost:8080/webapp/faces/mypage.xhtml -->
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
    </web-app>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a client who wants us to prove that we have the right
I have a client that wants to use Windows Live ID Delegated Authentication SDK
i have a client who is required to use specific tracking that is only
I have a client who wants to use GWT with MySQL. What's the best
I have a client who wants to use their Facebook photos in an iPhone
I have a client who wants his script to be tweaked for some modifications.
I have a client who wants to offer options on the first page of
I have a client who requested piano keys as links and he wants them
We have a client who desires some extremely long pages. Say 4000px plus. They
I have a client who wants to open variously sized images in a centered

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.