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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:51:23+00:00 2026-05-28T04:51:23+00:00

does anybody have the a4j:push tag functional in an environment simular like mine? Richfaces

  • 0

does anybody have the a4j:push tag functional in an environment simular like mine?

  • Richfaces 4.1-FINAL
  • MyFaces 2.1.5
  • Atmosphere 0.83
  • Tomcat 7.0.23

Any suggestions are very welcome.

Thanks,
Milo van der Zee

This is what I have for testing:

web.xml (EDIT: fixed):

...
<!-- Richfaces push servlet -->
<context-param>
    <param-name>org.richfaces.push.jms.disable</param-name>
    <param-value>true</param-value>
</context-param>
<context-param>
    <param-name>org.atmosphere.useBlocking</param-name>
    <param-value>true</param-value>
</context-param>
<filter>
    <filter-name>PushFilter</filter-name>
    <filter-class>org.richfaces.webapp.PushFilter</filter-class>
    <async-supported>true</async-supported>
</filter>
<filter-mapping>
    <filter-name>PushFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<context-param>
    <param-name>org.richfaces.push.handlerMapping</param-name>
    <param-value>/__richfaces_push</param-value>
</context-param>
<servlet>
    <servlet-name>Push Servlet</servlet-name>
    <servlet-class>org.richfaces.webapp.PushServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Push Servlet</servlet-name>
    <url-pattern>/__richfaces_push</url-pattern>
</servlet-mapping>
...

TestPushBean.java:

package com.vetmanager.base.test;

import java.text.SimpleDateFormat;
import java.util.Calendar;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import org.apache.log4j.Logger;
import org.richfaces.application.push.MessageException;
import org.richfaces.application.push.TopicKey;
import org.richfaces.application.push.TopicsContext;

/**
 *
 */
@ManagedBean
@SessionScoped
public class TestPushBean {
    private static final Logger LOGGER = Logger.getLogger(TestPushBean.class.getName());

    private static final TopicKey TOPIC_KEY = new TopicKey("push");

    /**
     * Constructor init's the topic.
     */
    public TestPushBean() {
        LOGGER.debug("TestPushBean");

        TopicsContext topicsContext = TopicsContext.lookup();
        topicsContext.getOrCreateTopic(TOPIC_KEY);
    }

    /**
     * @return String
     */
    public String getNow() {
        LOGGER.debug("getNow");

        Calendar now = Calendar.getInstance();
        SimpleDateFormat dateFormatter = new SimpleDateFormat("dd-MMM-yyyy/HH:mm:ss");
        return dateFormatter.format(now.getTime());
    }

    /**
     * 
     */
    public void push() {
        LOGGER.debug("push");

        TopicsContext topicsContext = TopicsContext.lookup();
        try {
            topicsContext.publish(TOPIC_KEY, "Test String");
        } catch (MessageException e) {
            LOGGER.error("push: " + e, e);
        }
    }
}

and:
test.xhtml:

<!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:f="http://java.sun.com/jsf/core"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:rich="http://richfaces.org/rich"
  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
  xmlns:c="http://java.sun.com/jsp/jstl/core"
>

<h:head>
</h:head>

<h:body>
    <h:form>
        <a4j:push id="push" address="push" onerror="alert(event.rf.data)">
            <a4j:ajax event="dataavailable" render="now" execute="@none"/>
        </a4j:push>

        Tijd: <h:outputText id="now" value="#{testPushBean.now}"/><br/>

        <a4j:commandButton value="event" actionListener="#{testPushBean.push()}"/>
    </h:form>
</h:body>

</html>
  • 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-28T04:51:24+00:00Added an answer on May 28, 2026 at 4:51 am

    This forum post may be useful from someone who is using Servlets API 2.5
    (also problem when you are using web.xml with version=2.5):

    https://community.jboss.org/message/647015#647015

    Btw your specific issue may be:

    Use Atmosphere 0.8.0-RC1 with RichFaces 4.1.0.Final, since Atmosphere 0.8.3 has incompatible API with RC1!

    Otherwise I would need to provide some symptoms.

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

Sidebar

Related Questions

Does anybody have any advice on working in a Date Driven Development environment? Essentially,
Does anybody have any example code on how this would work? Seems like it
Does anybody have an example on how to type letters onto a form, like
Somebody mentioned BuildMaster to me lately as build management environment. http://inedo.com/buildmaster/features/all-features Does anybody have
Does anybody have experiences about the mass compatibility (commercial hosts) of relations like FOREIGN
Does anybody have a short code sample that can be run in the VS
Does anybody have any reference material that details Cauchy-Reed algorithm? Googling for Cauchy-Reed Solomon
Does anybody have any experience with different fonts for OCR? I am generating an
Does anybody have any idea how to print an excel file programatically using C#
does anybody have any experience writing up a offline data storage & access app

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.