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
  • 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-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

Ask A Question

Stats

  • Questions 495k
  • Answers 495k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use a patternset to restrict the files to be extracted… May 16, 2026 at 11:14 am
  • Editorial Team
    Editorial Team added an answer Make sure the DOM is loaded first by doing this:… May 16, 2026 at 11:14 am
  • Editorial Team
    Editorial Team added an answer I suggest two improvements: Cache DOM References Work at your… May 16, 2026 at 11:14 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have this Haml view: !!! strict %html{:xmlns => http://www.w3.org/1999/xhtml} %head %meta{:content => text/html;
I have this login page managed in php. It contains several checkboxes, radiobuttons and
I have this message <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server</faultcode> <faultstring>LOGIN-ERR:Incorrect password - user could
I have this code. The code below is working in Firefox, but it is
Please, help me with one problem. I have this code, for submitting form via
hope you can help me with this: I'm working with j_security_check and have this
I'm making a web application in which certain pages are login-protected. I have created
In my robots.txt i have this: Disallow: /lo lo is a directory with a
this is a question i've seen here but the solution posted didn't resolve my
I'm designing the view for my site, which has a standard login and landing

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.