An error “jQuery is not defined” when loading a page in RichFaces 4.2.2.

Solution Verified - Updated -

Issue

  • An error “jQuery is not defined” when loading a page in RichFaces 4.2.2.

Page code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j" 
      xmlns:rich="http://richfaces.org/rich"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head>
<script type="text/javascript" >
    jQuery(document).ready(function() { 
            showNotification(); 
        });

    function showNotification(){
        alert('here');
    }

    </script>
</h:head> 
<body>
    <rich:panel>

    </rich:panel>


</body> 
</html>

Environment

  • JBoss Web Framework Kit 2
  • RichFaces 4.2.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.