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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:50:04+00:00 2026-05-15T23:50:04+00:00

I have this login.xhtml JSF page: <?xml version=1.0?> <jsp:root version=2.0 xmlns:jsp=http://java.sun.com/JSP/Page xmlns:f=http://java.sun.com/jsf/core xmlns:h=http://java.sun.com/jsf/html> <jsp:directive.page

  • 0

I have this login.xhtml JSF page:

<?xml version="1.0"?>
<jsp:root version="2.0"
  xmlns:jsp="http://java.sun.com/JSP/Page"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html">
<jsp:directive.page contentType="text/html"/>
<f:view>
  <h:inputText value="#{userBean.id}"/>
</f:view>
</jsp:root>

Output HTML contains properly rendered <input> tag, but <jsp:*> are left untouched. Seems that JSF just didn’t understand them. Why?

  • 1 1 Answer
  • 1 View
  • 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-15T23:50:05+00:00Added an answer on May 15, 2026 at 11:50 pm

    Your’re using JSF 2.0 and the file has a *.xhtml extension. You’re actually using Facelets as view technology, not JSP. Facelets is the successor of JSP. You cannot mix Facelets with JSP tags. Get rid of all <jsp:> tags, they are worthless and ain’t ever going to work in a Facelets page. The JSP tags are only parsed when you name the file *.jsp which will be picked up by servletcontainer’s builtin JspServlet. But since you’re using JSF 2.0 with Facelets, you already have the FacesServlet for the job. Forget JSP 🙂

    Here’s how your XHTML file should look like:

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
        <h:head>
            <title>Title</title>
        </h:head>
        <h:body>
            <h:inputText value="#{userBean.id}"/>
        </h:body>
    </html>
    

    Note that you’d like to put that input component in a <h:form>, but I bet that it’ll be just a test example.

    Also note that <!DOCTYPE html> is perfectly legit here. You don’t need the XHTML doctype. Facelets will take care about setting the right text/html content type, UTF-8 character encoding and so on.

    See also:

    • JSF/Facelets tutorial in Java EE 6 tutorial chapter 4-9
    • JSF 2.0 tutorial at Coreservlets.com
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this composition : <!DOCTYPE html> <ui:composition xmlns=http://www.w3.org/1999/xhtml xmlns:h=http://java.sun.com/jsf/html xmlns:f=http://java.sun.com/jsf/core xmlns:ui=http://java.sun.com/jsf/facelets> <h:panelGroup rendered=#{empty
I have this situation: There are a login page with a login form (form
i have this page . login: fer password: m Note: after login you will
I have a login mechanism consisting of a JSF page + managed bean +
In a JSF application, we have the directory hierarchy: webapp xhtml login.xhtml main.xhtml search.xhtml
I have this login page managed in php. It contains several checkboxes, radiobuttons and
I have used tiles in Spring web flow.This is my standard jsf file. standard.xhtml
I have confused for this login method, especially for different access page for some
This is the code from .aspx file <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title>Login Again</title> <script
I have a problem with one JSF page. This is the source code: <!DOCTYPE

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.