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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:40:48+00:00 2026-05-31T06:40:48+00:00

I want to implement JSF page with AJAX. This is the code of the

  • 0

I want to implement JSF page with AJAX. This is the code of the JSF page:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"    
      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:head>
        <ui:insert name="header">           
            <ui:include src="header.xhtml"/>         
        </ui:insert>
    </h:head>
    <h:body>

        <h1><img src="resources/css/images/icon.png" alt="NVIDIA.com" /> Settings Center</h1>
        <!-- layer for black background of the buttons -->
        <div id="toolbar" style="margin: 0 auto; width:1180px; height:30px; position:relative;  background-color:black">
            <!-- Include page Navigation -->
            <ui:insert name="Navigation">           
                <ui:include src="Navigation.xhtml"/>         
            </ui:insert>

        </div>  

        <div id="greenBand" class="ui-state-default ui-corner-allh" style="position:relative; top:35px; left:0px;"> 
            <h:graphicImage alt="Application Settings"  style="position:relative; top:-20px; left:9px;"  value="resources/images/logo_application_settings.png" />
        </div>
        <div id="main" style="margin: 0 auto; width:1190px; height:700px; position:absolute;  background-color:transparent; top:105px">

            <div id="mainpage" style="margin: 0 auto; width:1190px; height:500px; position:absolute;  background-color:transparent; top:80px">

                <div id="settingsdiv" style="width:350px; height:400px; position:absolute;  background-color:r; top:20px; left:1px">
                    <h:panelGrid columns="2">
                        <h:panelGroup>User Session Timeout</h:panelGroup>
                        <h:panelGroup>
                            <h:selectOneMenu value="#{ApplicationController.settingValue('SessionTTL')}">
                                <f:selectItem itemValue="one" itemLabel="Option one" />
                                <f:selectItem itemValue="two" itemLabel="Option two" />
                                <f:selectItem itemValue="three" itemLabel="Option three" />
                                <f:selectItem itemValue="custom" itemLabel="Define custom value" />
                                <f:ajax render="input" />
                            </h:selectOneMenu>
                            <h:panelGroup id="input">
                                <h:inputText value="#{ApplicationController.settingValue('SessionTTL')}" rendered="#{bean.type == 'custom'}" required="true" />
                            </h:panelGroup>            
                        </h:panelGroup>

                        <h:panelGroup>Maximum allowed users</h:panelGroup>
                        <h:panelGroup>#{ApplicationController.settingValue('MaxUsersActive')}</h:panelGroup>                                                                     
                    </h:panelGrid>                                                             

                </div>   

                <div id="settingslayer" style="width:350px; height:400px; position:absolute;  background-color:transparent; top:20px; left:400px">



                </div>   

                <div id="settingspanel" style="width:350px; height:400px; position:absolute;  background-color:transparent; top:20px; left:800px">


                </div>   



            </div>  
        </div>

    </h:body>
</html>

When I load the page I get this error:

One or more resources have the target of “head”, but no “head” component has been defined within the view.

This is the code of the header:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"    
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">


    <title>Settings Center</title>
    <link href="resources/css/helper.css" media="screen" rel="stylesheet" type="text/css" />

    <link href="resources/css/dropdown.css" media="screen" rel="stylesheet" type="text/css" />
    <link href="resources/css/default.advanced.css" media="screen" rel="stylesheet" type="text/css" />

    <!--[if lt IE 7]>
    <script type="text/javascript" src="js/jquery/jquery.js"></script>
    <script type="text/javascript" src="js/jquery/jquery.dropdown.js"></script>
    <![endif]-->

    <!-- / END -->



</html>

The Ajax is not working and this error message appears when I load the page. Maybe I’m missing something to add. How I can fix the code?

Best wishes
Peter

  • 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-31T06:40:50+00:00Added an answer on May 31, 2026 at 6:40 am

    Try to put <ui:composition> inside <html> and around its content in header.xhtml.

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

Sidebar

Related Questions

I want to implement Prime Faces example I created this JSF page: <?xml version='1.0'
I want to implement this JSF page with pagination and sorting. Unfortunately Netbeans shows
given this class definition: public class Frame { IFrameStream CapturedFrom; } I want implement
I want to implement Ajax on my JSF web project. I googled and found
I want to implement something like this using JSF.(part of search screen) More and
I want to create JSF page with tabs. Something like this . But I
I I want to implement input filed validation. This is the code of the
I want to implement OSGI bundle with JSF pages - WAB file, which can
I want to set focus on inputText field in JSF on page load. How
i want to implement a small search engine , i have index page where

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.