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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:25:05+00:00 2026-06-18T12:25:05+00:00

I am using eclipse juno and I am trying to build a website. I

  • 0

I am using eclipse juno and I am trying to build a website. I am building the User interface and I would like to use JSF. The following code runs and when I run the file the information is displayed correctly on the screen.

<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

 <link rel="stylesheet" type="text/css" href="Stylesheets/flashcard.css" />

<title>Insert title here</title>
</head>
<body>
<f:view>
        <h:form>
        <h:commandButton value="Click"></h:commandButton>

        </h:form>
</f:view>

However I have read that it is better practice to write the code like this. This code just displays a blank page.

<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:f="http://java.sun.com/jsf/core" 
xmlns:h="http://java.sun.com/jsf/html">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

         <link rel="stylesheet" type="text/css" href="Stylesheets/flashcard.css" />

        <title>Insert title here</title>
        </head>
        <body>
        <f:view>
                <h:form>
                <h:commandButton value="Click"></h:commandButton>

                </h:form>
        </f:view>
    </body>
    </html>

The difference is subtle but in the second file I don’t use jsp <%@ tags if this makes sense. When creating the second file I chose JSF xhtml or something. Does anybody know what the problem might be?

  • 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-18T12:25:07+00:00Added an answer on June 18, 2026 at 12:25 pm

    Just rename the extension of the physical view file from some.jsp to some.xhtml. You don’t need to change the extension in the URL which you originally used. If you opened it by /some.jsf, then you should keep opening it by /some.jsf.

    Note that I assume that you’re using JSF2 and not the legacy JSF 1.x. Facelets is namely not natively supported by JSF 1.x. Also note that Facelets is not “just a better practice”, you must use it in JSF2 as JSP is deprecated.

    See also:

    • Our JSF wiki page – contains a Hello World
    • JSF Facelets: Sometimes I see the URL is .jsf and sometimes .xhtml. Why? – will likely clear up confusion about extensions
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started using the new Eclipse 4.2 (Juno) Null Analysis. On code like
I am using Maven 2.2.0 and Eclipse Juno. I am trying to import one
I am trying to create a grails 2.2.0 project using eclipse-jee-juno. It gives me
This is a bit weird. Using the newest Eclipse Juno release, I'm trying to
I'm using Eclipse Juno for RCP and RAP Developers. Following vogella.com , I could
I have been trying to deploy an Apache Axis2 WebService using Eclipse Juno, Maven
I am trying to use PyDev on Eclipse Juno to create a GoogleAppEngine project.
I'm trying to move to using the latest version of Eclipse (Juno 4.2) but
I use eclipse CDT (Juno release) and I've been trying out to be able
I am using Maven 2.2.0 and Eclipse Juno. I am trying to import one

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.