0

I'm working on prime faces. I've started primefaces push. Now when I attempt to publish some data to channels, got no answer showing it's working! After some googling, found that it might need a separate webapp from jsf webapp: primefaces push server config

Also I've noticed that in PF users guide mentioned about proxies and use of primefaces.PUSH_SERVER_URL; so set this param in web.xml to "http://localhost:8080"; because before setting this param browser said that can't stablish a connection to push server(Error 404)! I write some examples and also used primefaces show case. but facing the problem:

The connection to ws://localhost:8080//Chat-App/primepush/public;jsessionid=41A411605908EAD0B1C3EB353856AF4D/public/*?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.2.0-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&X-atmo-protocol=true was interrupted while the page was loading.

I guess there is some problems with tomcat itself(I mean configurations). I'd like to know if it's needed to create and config a new web app. if so how? if not what am I doing wrong?

Apache Tomcat 7.0.34 + primefaces 5.0 + atmosphere-runtime 2.2.3

Community
  • 1
  • 1
  • 1. Possible browser issue, try with another one (Chrome, FF, ..) to see if you get the same error. 2. Double check your primepush servlet declaration within your web.xml. 3. Are you launching Tomcat in standalone mode or from Eclipse or another IDE ? – Stephane Lallemagne Nov 17 '14 at 18:07
  • Thanks. I'm using latest version of both chrome and FireFox. Also I use a normal servlet config and map servlet request as: /primepush/*.(it's like as is in regular turorials.) Servlet container(apache-tomcat) launches from Eclipse JEE Luna 4.4.1 – Amir Bahrami Nov 17 '14 at 18:45
  • I think it is more likely to be with tomcat configurations. because almost every modern browsers support websockets. – Amir Bahrami Nov 17 '14 at 18:53
  • My configuration is working and is very similar to yours, except my version of Tomcat that is 7.0.47. Any version above 7.0.27 should work. I'm using exactly the same atmosphere-runtime-2.2.3 and it works as is. – Stephane Lallemagne Nov 18 '14 at 07:20
  • Does the error occur at server startup on when you call the page containing your push objects (``) ? If error is on the page, shrink it to the bare minimum (no template, no extra components that could conflict). – Stephane Lallemagne Nov 18 '14 at 07:30
  • StephaneLallemagne when requesting the page for first time no errors shown; but when I reload the page it says that Connection interrupted. Also it should be interesting that I even tried to publish data to channel. it's okay but seems pushendpoint not working. because @OnMessage method doesn't invoke! I think miss some special config about tomcat. but you say configs are similar. – Amir Bahrami Nov 18 '14 at 14:34
  • Hard to say, please post your code (partial xhtm and java) if possible... – Stephane Lallemagne Nov 18 '14 at 16:21
  • I've replaced my project files with these sources: [Source code] (https://github.com/muhdkhokhar/tutorials/tree/master/PrimefacesPushWebApp) all are the same! – Amir Bahrami Nov 18 '14 at 16:48
  • I'm trying to migrate to glassfish server to check the results! I hope this solve the issue! All others follow reqular implementations and succeeded but I still have problem! – Amir Bahrami Nov 18 '14 at 16:51

0 Answers0