Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/427.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java TypeError:jQuery.atmosphere未定义。js:2261_Java_Javascript_Jquery_Hibernate_Richfaces - Fatal编程技术网

Java TypeError:jQuery.atmosphere未定义。js:2261

Java TypeError:jQuery.atmosphere未定义。js:2261,java,javascript,jquery,hibernate,richfaces,Java,Javascript,Jquery,Hibernate,Richfaces,是否有人已出现此错误: TypeError:jQuery.atmosphere未定义。js:2261 我没有找到任何关于这方面的文档,也没有办法找到问题。(我添加了所有需要的依赖项) 这是我的test.xhtml: <ui:composition template="/pages/template/template.xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"

是否有人已出现此错误:

TypeError:jQuery.atmosphere未定义。js:2261

我没有找到任何关于这方面的文档,也没有办法找到问题。(我添加了所有需要的依赖项)

这是我的test.xhtml:

<ui:composition template="/pages/template/template.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jsp/jstl/core" 
xmlns:b="http://richfaces.org/sandbox/bootstrap"
lang="fr">

<ui:define name="body">
  <h:head>

    <h:outputScript name="javax.faces:jsf.js" />

    <h:outputScript name="jquery.js" />

</h:head>
<h:form>
    <h:panelGrid columns="4">
        <h:outputLabel value="Message:" />
        <h:inputText id="messageInput" styleClass="message" value="#    {richBean.message}">
        </h:inputText>

        <a4j:commandButton value="Send" action="#{richBean.sendMessage()}"
            execute="@form" render="messageInput" />

        <rich:messages for="messageInput" />
    </h:panelGrid>


</h:form>

<h:form>
   <h:panelGrid columns="3">
        <a4j:push address="pushCdi"
            ondataavailable="jQuery('&lt;li /&gt;').prependTo('#messages').text(event.rf.data)" />

        <ul id="messages" />
    </h:panelGrid> 


</h:form>

</ui:define>

My RichBean.java:

import javax.annotation.PostConstruct;
import javax.enterprise.event.Event;
import javax.faces.bean.ManagedBean;
import javax.inject.Inject;

import org.richfaces.application.push.TopicKey;
import org.richfaces.application.push.TopicsContext;
import org.richfaces.cdi.push.Push;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.ocpsoft.pretty.faces.annotation.URLMapping;
import com.ocpsoft.pretty.faces.annotation.URLMappings;
import javax.inject.Named;
import org.richfaces.application.push.TopicKey;
import org.richfaces.application.push.TopicsContext;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;

@ManagedBean(name = "richBean")
@Scope(value = "session")
@URLMappings(mappings = { @URLMapping(id = "rich", pattern = "/test", viewId = "/test.xhtml") })
@Named
public class RichBean {

    public static final String PUSH_CDI_TOPIC = "pushCdi";

    private String message;

   @Push(topic = PUSH_CDI_TOPIC)
   @Inject
   Event<String> pushEvent;

     public void sendMessage() {
       pushEvent.fire(message);
       message = "";
    }

}
import javax.annotation.PostConstruct;
导入javax.enterprise.event.event;
导入javax.faces.bean.ManagedBean;
导入javax.inject.inject;
导入org.richfaces.application.push.TopicKey;
导入org.richfaces.application.push.TopicsContext;
导入org.richfaces.cdi.push.push;
导入org.springframework.beans.factory.annotation.Autowired;
导入org.springframework.beans.factory.annotation.Qualifier;
导入org.springframework.context.annotation.Scope;
导入org.springframework.stereotype.Component;
导入org.springframework.stereotype.Service;
导入com.ocpsoft.pretty.faces.annotation.URLMapping;
导入com.ocpsoft.pretty.faces.annotation.URLMappings;
导入javax.inject.Named;
导入org.richfaces.application.push.TopicKey;
导入org.richfaces.application.push.TopicsContext;
导入org.richfaces.log.Logger;
导入org.richfaces.log.RichfacesLogger;
@ManagedBean(name=“richBean”)
@范围(value=“会话”)
@URLMappings(mappings={@URLMapping(id=“rich”,pattern=“/test”,viewId=“/test.xhtml”)})
@命名
公共类RichBean{
公共静态最终字符串PUSH\u CDI\u TOPIC=“pushCdi”;
私有字符串消息;
@推送(主题=推送\u CDI\u主题)
@注入
事件推送事件;
公共无效发送消息(){
pushEvent.fire(消息);
message=“”;
}
}
和Template.xhtml:

<!DOCTYPE html>
<f:view xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:c="http://java.sun.com/jsp/jstl/core" lang="fr">

    <ui:remove> 

    </ui:remove>

    <html>
        <c:set var="ctx" value="#{facesContext.externalContext.requestContextPath}" scope="request"/>
        <c:set var="myContext" value="#{request.serverName}:#{request.serverPort}#{request.contextPath}" scope="request" />

        <h:head>

            <title>#{messages['title']}<ui:insert name="title"></ui:insert></title>

            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <meta http-equiv="X-UA-Compatible" content="IE=8;IE=7,chrome=1" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0" />
            <meta charset="utf-8" />

            <meta http-equiv="Expires" content="0" />
            <meta http-equiv="Pragma" content="no-cache" />
            <meta http-equiv="Cache-Control" content="no-cache" />
            <meta http-equiv="Cache-Control" content="private" />
            <meta http-equiv="Cache-Control" content="no-store" />
            <meta http-equiv="Cache-Control" content="max-stale=0" />

            <link rel="shortcut icon" href="${ctx}/favicon.ico" />
            <link rel="icon" type="image/ico" href="${ctx}/favicon.ico" />

            <!-- CSS -->

            <h:outputStylesheet library="css" name="style.css" />

            <link href="${ctx}/resources/css/jquery-ui.css" rel="stylesheet"
                type="text/css" media="screen" />

            <link href="${ctx}/resources/css/bootstrap.min.css" rel="stylesheet"
                type="text/css" media="screen" />

            <link href="${ctx}/resources/css/bootstrap-theme.min.css" rel="stylesheet"
                type="text/css" media="screen" />

            <link href="${ctx}/resources/css/theme.css" rel="stylesheet"
                type="text/css" media="screen" />

            <link href="${ctx}/resources/css/footer.css" rel="stylesheet"
                type="text/css" media="screen" />

            <link href="${ctx}/resources/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
                type="text/css" media="screen" />

            <!-- CSS end -->

            <ui:insert name="headAdd" />

            <ui:remove>
                <!--  Enable usage of html5 with old browsers -->
            </ui:remove>

            <h:outputText value="&lt;!--[if lt IE 9]&gt;" escape="false" />
            <h:outputScript library="js" name="html5.js" />
            <h:outputText value="&lt;![endif]--&gt;" escape="false" />

            <ui:remove>
            </ui:remove>
            <h:outputText value="&lt;!--[if lte IE 7]&gt;" escape="false" />
            <link rel="stylesheet" type="text/css" href="#{resource['css:styleIE.css']}" />
            <h:outputText value="&lt;![endif]--&gt;" escape="false" />

        </h:head>       
        <h:body>

            <div id="container" class="wrapper">
                <header>
                    <ui:insert name="header">
                        <ui:include src="parts/header.xhtml" />
                    </ui:insert>
                </header>

                <ui:insert name="body">
                    <ui:include src="parts/body.xhtml" />
                </ui:insert>

                <div class="push"></div>
            </div>
            <div style="padding: 0px 15px 0px 15px;">
                <div class="footer">
                    <ui:insert name="footer">
                        <ui:include src="parts/footer.xhtml" />
                    </ui:insert>
                </div>
            </div>

            <h:outputScript library="jquery" name="jquery.js" target="head" />
            <h:outputScript library="jquery" name="jquery-ui.js" target="head" />
            <h:outputScript library="js" name="bootstrap.min.js" />
            <h:outputScript library="js" name="moment.min.js" />
            <h:outputScript library="js" name="bootstrap-datetimepicker.min.js" />
            <h:outputScript library="js" name="table.js" />

        <rich:jQuery selector=".stable tr:odd" query="addClass('odd-row')" />
        <rich:jQuery selector=".stable tr:even" query="addClass('even-row')" />
        <rich:jQuery selector=".stable tr" event="mouseover"
            query="jQuery(this).addClass('active-row')" />
        <rich:jQuery selector=".stable tr" event="mouseout"
            query="jQuery(this).removeClass('active-row')" />
        <rich:jQuery selector=".stable tr" event="click"
            query="jQuery('.click-row').removeClass('click-row');jQuery(this).addClass('click-row')" />

        <rich:notifyMessages showDetail="true" globalOnly="true" styleClass="my-alert alert-info" style="margin-top:15px;" stayTime="5000" nonblocking="true" />
</h:body>
    </html>
</f:view>

#{messages['title']}
My pom.xml:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <artifactId>barApp</artifactId>
        <packaging>war</packaging>
        <name>barApp</name>

        <properties>
            <spring.version>3.0.5.RELEASE</spring.version>
            <richfaces.version>4.3.5.Final</richfaces.version>
            <hibernate.version>3.6.0.Final</hibernate.version>
            <cxf.version>2.6.1</cxf.version>
        </properties>

        <reporting>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.6.1</version>
                </plugin>
            </plugins>
        </reporting>

        <dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<version>${richfaces.version}</version>
<scope>import</scope>
    <type>pom</type>
                </dependency>
            </dependencies>
        </dependencyManagement>
        <version>0.0.1-Snapshot</version>
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
<artifactId>maven-resources-plugin</artifactId>
  <version>2.5</version>
                    </plugin>
                </plugins>
            </pluginManagement>
            <filters>
                <filter>src/main/filters/application-${env}.properties</filter>
            </filters>
            <resources>
<resource>
        <directory>src/main/resources</directory>
                    <filtering>true</filtering>
                </resource>
                <resource>
                    <directory>src/main/jks</directory>
                    <filtering>false</filtering>
                </resource>
            </resources>
            <plugins>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <configuration>
                        <warSourceDirectory>src/main/webapp/</warSourceDirectory>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Environment>${env}</Implementation-Environment>
                                <Implementation-Build>${buildNumber}</Implementation-Build>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>

            </plugins>

            <finalName>barApp</finalName>
        </build>
        <profiles>
            <profile>
                <id>tc6</id>
                <properties>
                    <env>dev</env>
                </properties>
                <activation>
                    <activeByDefault>true</activeByDefault>
                </activation>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-rt-frontend-jaxws</artifactId>
                        <version>${cxf.version}</version>
                    </dependency>       
                </dependencies>
            </profile>
            <profile>
                <id>jboss6</id>
                <properties>
                    <env>dev</env>
                </properties>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-tx</artifactId>
                        <version>${spring.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-beans</artifactId>
                        <version>${spring.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context</artifactId>
                        <version>${spring.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-core</artifactId>
                        <version>${spring.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-expression</artifactId>
                        <version>${spring.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-rt-transports-http-jetty</artifactId>
    <version>${cxf.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-core</artifactId>
                        <version>${hibernate.version}</version>
<scope>provided</scope>
                    </dependency>
                    <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
<scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
                        <version>3.2.0.Final</version>
                        <scope>provided</scope>
 </dependency>
<dependency>
    <groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
    <version>4.0.2.GA</version>
                        <scope>provided</scope>
    <exclusions>
                            <exclusion>
<artifactId>stax-api</artifactId>
   <groupId>javax.xml.stream</groupId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>cglib</groupId>
                        <artifactId>cglib-nodep</artifactId>
                        <version>2.2</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                        <version>1.2.12</version>
                        <!-- <scope>provided</scope> -->
                    </dependency>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                        <version>1.6.1</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                        <version>1.6.1</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>xalan</groupId>
                        <artifactId>xalan</artifactId>
                        <version>2.7.1</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>xerces</groupId>
                        <artifactId>xercesImpl</artifactId>
                        <version>2.9.1</version>
                        <scope>provided</scope>
                    </dependency>
                    <!-- XML -->
                    <dependency>
                        <groupId>xml-apis</groupId>
                        <artifactId>xml-apis</artifactId>
                        <version>1.3.04</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <artifactId>xml-resolver</artifactId>
                        <groupId>xml-resolver</groupId>
                        <version>1.2</version>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
            </profile>
        </profiles>

        <dependencies>

            <!-- SPRING -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-asm</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aspects</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-expression</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jms</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <!-- HIBERNATE -->
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-ehcache</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-entitymanager</artifactId>
                <version>${hibernate.version}</version>
                <exclusions>
                    <exclusion>
  <artifactId>cglib</artifactId>
    <groupId>cglib</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-c3p0</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>4.0.2.GA</version>
                <exclusions>
                    <exclusion>
                        <artifactId>stax-api</artifactId>
                        <groupId>javax.xml.stream</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- JSF -->
            <dependency>
                <groupId>com.sun.faces</groupId>
                <artifactId>jsf-api</artifactId>
                <version>2.1.0-b09</version>
            </dependency>
            <dependency>
                <groupId>com.sun.faces</groupId>
                <artifactId>jsf-impl</artifactId>
                <version>2.1.0-b09</version>
            </dependency>

            <!-- RICHFACES -->
            <dependency>
                <groupId>org.richfaces.core</groupId>
                <artifactId>richfaces-core-impl</artifactId>
            </dependency>
            <dependency>
                <groupId>org.richfaces.ui</groupId>
                <artifactId>richfaces-components-ui</artifactId>
            </dependency>
            <dependency>
                <groupId>commons-beanutils</groupId>
                <artifactId>commons-beanutils</artifactId>
                <version>1.8.0</version>
            </dependency>
            <dependency>
                <groupId>commons-httpclient</groupId>
                <artifactId>commons-httpclient</artifactId>
                <version>3.1</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>2.2</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
                <version>1.1</version>
            </dependency>
    <dependency>
          <groupId>org.atmosphere</groupId>
          <artifactId>atmosphere-jquery</artifactId>
          <version>1.0.2</version>
          <type>war</type>
        </dependency>

        </dependencies>
    </project>

4.0.0
巴拉普
战争
巴拉普
3.0.5.1发布
4.3.5.最终版本
3.6.0.1最终版本
2.6.1
org.apache.maven.plugins
maven javadoc插件
2.6.1
org.richfaces
richfaces bom表
${richfaces.version}
进口
聚甲醛
0.0.1-快照
maven资源插件
2.5
src/main/filters/application-${env}.properties
src/main/resources
真的
src/main/jks
假的
maven战争插件
src/main/webapp/
真的
${env}
${buildNumber}
org.apache.maven.plugins
maven编译器插件
1.6
1.6
巴拉普
tc6
发展
真的
org.apache.cxf
cxf rt前端jaxws
${cxf.version}
jboss6
发展
org.springframework
德克萨斯州春季
${spring.version}
假如
org.springframework
春豆
${spring.version}
假如
org.springframework
spring上下文
${spring.version}
假如
org.springframework
弹簧芯
${spring.version}
假如
org.springframework
弹簧式
${spring.version}
假如
    <!DOCTYPE html>
        <html><head>

                <title>ITcketing</title>

                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                <meta http-equiv="X-UA-Compatible" content="IE=8;IE=7,chrome=1" />
                <meta name="viewport" content="width=device-width, initial-scale=1.0" />
                <meta charset="utf-8" />

                <meta http-equiv="Expires" content="0" />
                <meta http-equiv="Pragma" content="no-cache" />
                <meta http-equiv="Cache-Control" content="no-cache" />
                <meta http-equiv="Cache-Control" content="private" />
                <meta http-equiv="Cache-Control" content="no-store" />
                <meta http-equiv="Cache-Control" content="max-stale=0" />


                <link href="/barApp/resources/css/jquery-ui.css" rel="stylesheet" type="text/css" media="screen" />

                <link href="/barApp/resources/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" />
                <link href="/barApp/resources/css/footer.css" rel="stylesheet" type="text/css" media="screen" />
                <link rel="stylesheet" type="text/css" href="/barApp/javax.faces.resource/styleIE.css.xhtml?ln=css" /><![endif]--><link type="text/css" rel="stylesheet" href="/barApp/javax.faces.resource/style.css.xhtml?ln=css" /><script type="text/javascript" src="/barApp/javax.faces.resource/jsf.js.xhtml?ln=javax.faces"></script><script type="text/javascript" src="/barApp/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.3.5.Final/PackedCompressed/jquery.js"></script><script type="text/javascript" src="/barApp/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.3.5.Final/PackedCompressed/packed/packed.js"></script><link type="text/css" rel="stylesheet" href="/barApp/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.3.5.Final/PackedCompressed/plain/packed/packed.css" /><script type="text/javascript" src="/barApp/javax.faces.resource/jquery.js.xhtml?ln=jquery"></script><script type="text/javascript" src="/barApp/javax.faces.resource/jquery-ui.js.xhtml?ln=jquery"></script></head><body>

                <div id="container" class="wrapper">
                    <header>

        <table class="hidden-sm hidden-xs" width="100%" style="margin-top:-20px;">
            <tr>
                <td width="33%"><img src="/barApp/resources/css/images/logo.png" height="100px" />
                </td>
                <td valign="middle">

                        <h1 style="color: #003561;">ITcketing</h1>

                </td>
            </tr>
        </table>
                    </header><head><script type="text/javascript" src="RES_NOT_FOUND"></script></head>
    <form id="j_idt25" name="j_idt25" method="post" action="/barApp/test" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="j_idt25" value="j_idt25" />
<table>
<tbody>
<tr>
<td><label>
Message:</label></td>
 <td><input id="j_idt25:messageInput" type="text" name="j_idt25:messageInput" value="32" class="message" /></td>
<td><input id="j_idt25:j_idt28" name="j_idt25:j_idt28" onclick="RichFaces.ajax(&quot;j_idt25:j_idt28&quot;,event,{&quot;incId&quot;:&quot;1&quot;} );return false;" value="Send" type="submit" /></td>
    <td><span class="rf-msgs " id="j_idt25:j_idt29"></span></td>
    </tr>
    </tbody>
    </table>
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-2268432026713773464:4752734078205348919" autocomplete="off" />
    </form>
    <form id="j_idt30" name="j_idt30" method="post" action="/barApp/test" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="j_idt30" value="j_idt30" />
    <span id="j_idt30:pushJms"><script type="text/javascript">RichFaces.Push.setPushResourceUrl("/barApp/rfRes/org.richfaces.resource.PushResource.xhtml");new RichFaces.ui.Push("j_idt30:pushJms",{"address":"pushTopicsContext","ondataavailable":function(event){RichFaces.ajax(this,event,{"parameters":{"javax.faces.behavior.event":"dataavailable","org.richfaces.ajax.component":"j_idt30:pushJms"} ,"sourceId":this} )}} );</script></span><table>
    <tbody>
    <tr>
    <td><label>
    New UUID:</label></td>
    <td><div id="j_idt30:uuid">  
</div></td>
    </tr>
    </tbody>
    </table>
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-2268432026713773464:4752734078205348919" autocomplete="off" />
    </form>
<div class="push"></div>
</div>
<div style="padding: 0px 15px 0px 15px;">
<div class="footer">
<footer class="bs-docs-footer" role="contentinfo">
<div class="container"><img src="/barApp/resources/css/images/logo.png" height="80px" />    
</div>
</footer>
</div>
</div><script type="text/javascript" src="/barApp/javax.faces.resource/bootstrap.min.js.xhtml?ln=js"></script><script type="text/javascript" src="/barApp/javax.faces.resource/moment.min.js.xhtml?ln=js"></script><script type="text/javascript" src="/barApp/javax.faces.resource/bootstrap-datetimepicker.min.js.xhtml?ln=js"></script><script type="text/javascript" src="/barApp/javax.faces.resource/table.js.xhtml?ln=js"></script><script type="text/javascript" src="RES_NOT_FOUND"></script><span id="j_idt46" style="display: none;"><script type="text/javascript">RichFaces.jQuery.query({"selector":".stable tr:odd","query":"addClass('odd\u002Drow')"} );</script></span><span id="j_idt47" style="display: none;"><script type="text/javascript">RichFaces.jQuery.query({"selector":".stable tr:even","query":"addClass('even\u002Drow')"} );</script></span><span id="j_idt48" style="display: none;"><script type="text/javascript">RichFaces.jQuery.query({"selector":".stable tr","event":"mouseover","query":"jQuery(this).addClass('active\u002Drow')"} );</script></span><span id="j_idt49" style="display: none;"><script type="text/javascript">RichFaces.jQuery.query({"selector":".stable tr","event":"mouseout","query":"jQuery(this).removeClass('active\u002Drow')"} );</script></span><span id="j_idt50" style="display: none;"><script type="text/javascript">RichFaces.jQuery.query({"selector":".stable tr","event":"click","query":"jQuery('.click\u002Drow').removeClass('click\u002Drow');jQuery(this).addClass('click\u002Drow')"} );</script></span><span class="rf-ntf-msgs my-alert alert-info" id="j_idt51" style="margin-top:15px;"></span><script type="text/javascript">$(document).ready(function() {
    new RichFaces.ui.Message("j_idt25:j_idt29",{"forComponentId":"j_idt25:messageInput","isMessages":true} )
    new RichFaces.ui.NotifyMessage("j_idt51",{"showDetail":true,"globalOnly":true,"isMessages":true} ,{"nonblocking":true,"stayTime":5000,"styleClass":"my\u002Dalert alert\u002Dinfo"} )
    });
    </script></body>
        </html>
jquery.js=path/to/your/jquery.js
package example;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

import javax.faces.application.Resource;
import javax.faces.application.ResourceHandler;
import javax.faces.application.ResourceHandlerWrapper;
import javax.faces.application.ResourceWrapper;

import org.apache.commons.io.IOUtils;

import com.google.common.base.Charsets;

/**
 * Fixes "jQuery.atmosphere is undefined" in packed.js from Richfaces when using resource optimization (packing, compression).
 * 
 * Based on: https://developer.jboss.org/message/807297#807297
 */
public class CustomResourceHandler extends ResourceHandlerWrapper {

    // Private Constants
    private static final String RICHFACES_PACKED_STATIC_RESOURCE = "org.richfaces.staticResource/4.3.3.Final/Packed/packed/packed.js";

    private final ResourceHandler wrapped;

    public CustomResourceHandler(final ResourceHandler wrapped) {
        this.wrapped = wrapped;
    }

    @Override
    public ResourceHandler getWrapped() {
        return wrapped;
    }

    @Override
    public Resource createResource(String resourceName, String libraryName) {
        Resource r = super.createResource(resourceName, libraryName);
        if (resourceName.equals(RICHFACES_PACKED_STATIC_RESOURCE)) {
            return new RichfacesPackedResourceWrapper(r);
        }
        return r;
    }

}

class RichfacesPackedResourceWrapper extends ResourceWrapper {

    private final Resource wrapped;

    public RichfacesPackedResourceWrapper(Resource r) {
        this.wrapped = r;
    }

    @Override
    public Resource getWrapped() {
        return wrapped;
    }

    @Override
    public InputStream getInputStream() throws IOException {
        InputStream s = super.getInputStream();
        String contents = fixRichFacesPackedDotJs(IOUtils.toString(s));

        return new ByteArrayInputStream(contents.getBytes(Charsets.UTF_8));
    }

    private String fixRichFacesPackedDotJs(String javaScriptText) {
        String token = "if (jQuery.atmosphere.requests.length > 0) {";

        int pos = javaScriptText.indexOf(token);
        if (pos > 0) {
            StringBuilder buf = new StringBuilder();
            buf.append(javaScriptText.substring(0, pos));
            buf.append("if (!jQuery.atmosphere) { return; }; ");
            buf.append(javaScriptText.substring(pos));
            javaScriptText = buf.toString();
        }

        // jQuery.atmosphere.unsubscribe();
        token = "jQuery.atmosphere.unsubscribe();";
        pos = javaScriptText.indexOf(token);

        if (pos > 0) {
            StringBuilder buf = new StringBuilder();
            buf.append(javaScriptText.substring(0, pos));
            buf.append("if (!jQuery.atmosphere) { return; }; ");
            buf.append(javaScriptText.substring(pos));
            javaScriptText = buf.toString();
        }

        return javaScriptText;
    }
}
<resource-handler>example.CustomResourceHandler</resource-handler>