1

I'm working with liferay 6.2 (Tomcat 7) and Primefaces 5.0. I tryed to execute the counter example but not worked. More precisely, I downloaded the showcase 5.0 war from primefaces site.

I read that I have to enable NIO Connector. So, according this reply, I added the connector:

<Connector connectionTimeout="20000" port="8081" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443"/>

But primefaces push still doesn't work.

What I have to enable in Tomcat in order to make work primefaces push?

Community
  • 1
  • 1
Valerio Emanuele
  • 909
  • 13
  • 27

2 Answers2

0

I don't know if it is the undocumented specification or it is a bug, but the @PushEndpoint class needs @OnOpen and @OnClose function, even if they are empty.

Add these lines to the @PushEndpoint annotated class:

@OnOpen
public void onOpen( RemoteEndpoint r, EventBus e ) {
}

@OnClose
public void onClose( RemoteEndpoint r, EventBus e ) {
}

For me this was the solution.

GregTom
  • 352
  • 4
  • 15
0

It worked for me brother with Prifaces 5, Tomcat 7 and import atmosphere-runtime-2.2.3.jar without any configuration in web.xml

<h:form>
 <p:socket onMessage="bien" channel="/messageDetail" />
</h:form>

<script type="text/javascript">
function bien(data) {
    alert("boneo");
    //$('.display').html(data);
}
</script>
AKID Ahmed
  • 19
  • 1
  • 4