tomcat,primefaces,safari,websocket,push , primefaces push not working in Safari using AWS Tomcat7

primefaces push not working in Safari using AWS Tomcat7


Tag: tomcat,primefaces,safari,websocket,push

I am using PrimeFaces 5.1, JSF 2.1 and tomcat 7 and my application is in AWS. atmosphere version 2.2.2.

I am not able to use push functionality in Safari 5.1.7.

We have configured the AWS to enable push based on Primeface push with AWS , Websocket with Tomcat 7 on AWS Elastic Beanstalk and Creation of .ebextensions folder in aws elastic beanstalk.

Push is working in all other browsers.

I tried the solution provided in primepush on Tomcat 7 not working which was unsuccessful.

Safari console shows enter image description here

Any help is appreciated..

Update1: one option is to try non secure websockets when safari browser is detected (from If so, the question is how to make the primefaces's push to select non secure web socket?

Update2: tried implementing SSL to see if push was not working in Safari due to our self signed certificate. that also didnot seem to work either.


This problem occurred due to a missing configuration the web.xml. On analysing tomcat's log (catalina.out), found an error when Safari was trying to connnect to tomcat, ERROR org.atmosphere.cpr.AsynchronousProcessor - Invalid request state. AsyncContext#startAsync not supported.

On searching with this error, found a solution from!topic/atmosphere-framework/D5-yrW6NzLU

Added <async-supported>true</async-supported> to shiroFilter in web.xml like


Using this, Safari 5.1.7 was able to use push functionality.

Hope this help somebody else like it helped me.


Why are fields reset after ajax update with Primefaces

On a form I have some personal information (name, address etc.) and a changeListener which updates the salutation and letter salutation according to the gender and last name. If the underlying entity was already stored in the database it works fine. If I'm entering data for a new (not saved)...

adjust the rows dynamically in paginator of primefaces datatable

I am using the primefaces datatable paginator. I have fixed the to no of rows to 15. This correctly matches the my system resolution. But users are using monitors with different(bigger) resolutions. The no of rows in this case will be less and space will be displayed at the bottom....

Remote debugging tomcat with OpenShift

I am using openshift for my tomcat webapp. I am able to run the app but unable to debug it. As openshift starts tomcat in debug mode, I was expecting I'll be able to debug. Host: $OPENSHIFT_JBOSSEWS_IP Value of this is for me which I got from command: rhc...

Primefaces p:remoteCommand parameter always null

I am trying to pass a parameters with p:remoteCommand Unfortunately when I retrieve the paramer in my bean method I always get null. Is there anything wrong with my code? Here is my page code: <a href="#" onclick="rc([{'d':'01'}])">01</a> <p:remoteCommand name="rc" update=":myform:messages" actionListener="#{mybean.changedaybar}" /> and this is the bean method: public...

Primefaces 5.2 get jqplot instance from p:chart

I have p:chart on my site like this <p:chart id="chart" type="line" widgetVar="chart" model="#{resultsViewController.areaModel}" style="height:600px"/> Now I want the client to be able to modify some display options without reloading the page, in order to do that I need to acquire the jqplot instance. How can I do that? I read...

Meaning of connectionTimeout in tomcat

What does that parameter mean for tomcat. It was declared in server.xml as follows: <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> So, I tried to change it <Connector connectionTimeout="2" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> and didn't notice any effect. I expected that each page the load takes for more than 2 milliseconds would produce...

Disable direct access to application via Tomcat

I have a small local (internal to organisation) browser application running on Tomcat. I have inherited an application (also for internal organisation use only) running under PHP server which I have been asked to get running on the same box. I decided the best thing was to get both Tomcat...

Deploye two wars with different domain name but same context-path in same jboss-4.0.3

I've two web application wars STORE_ABC.war and STORE_DEF.war and single JBoss server running on my machine. I want to deploye both war with same context path in my jboss as follows. http://localhost:8080/home For STORE_ABC.war http://testsite1:8080/home For STORE_DEF.war jboss-web.xml for STORE_ABC.war and STORE_DEF.war <jboss-web> <context-root>/</context-root> </jboss-web> How could I achieve above...

Is there a way to cluster different machines running Tomcat instances

I have setup multiple tomcat instances in a single machine to launch more threads, however, if I have to make use of 10 EC2 instances with Tomcat installed as a cluster, how would I achieve this. Any good resources to look at?

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver [Eclipse, Tomcat]

I know that's an over-asked question, but still I can't get this thing right. I'm running a web application on Eclipse who has to interact with a mysql database. It all runs on a tomcat 7.0.27 server on localhost. As much as I try to add my my mysql-connector-java-5.1.21-bin.jar to...

Intellij web application on tomcat server shows http://localhost:8080/index.jsp instead of http://localhost:8080/myapp/index.jsp

I'm following a tutorial on udemy. In the tutorial he is using eclipse. But i'm following the course with intellij. Every thing works fine but one thing i keep noticing is that when he runs the servlets or jsp pages it is always shows the project name before the servlet(http://localhost:8080/myapp/index.jsp)....

Using client certificate with Apache Axis 1

Prerequisites Apache Tomcat 7 Spring 3.2.11.RELEASE Apache Camel 2.14.1 Apache Axis 1 (1.4) Keystore including client certificate (private key, public key etc.): my_keystore.p12 Question I am trying to access a remote rpc/encoded werbservice using Apache Axis 1. It is neccessary to use Apache Axis 1 because of rpc/encoded style of...

how to uninstall tomcat from AWS linux?

What is the equivalent of sudo yum install tomcat7 tomcat7-webapps but for uninstalling tomcat7? Is there a straight forward method and that leaves no trace behind?

Refresh parent node from backing bean with primefaces tree

Currently I am working on a project that use primefaces 3.4.1 version which does not support drag and drop in tree component. So I am using a contextMenu instead of drag and drop. <p:tree id="treeHierarchy" value="#{hierarchyManagementBackingBean.root}" var="node" dynamic="true" selectionMode="single" cache="false" style="width:99%;" selection="#{hierarchyManagementBackingBean.selectedNode}"> <p:treeNode id="idtreenode"> <h:outputText value="#{} (#{node.entityType})" /> </p:treeNode> </p:tree>...

Netbeans project deployment failure

server.xml <Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084" protocol="HTTP/1.1" redirectPort="8443"/> Whenever, I'm trying to run my project then, it is redirecting it to my lan ip address resulting deployment failure. Please see below. Server Log The system cannot find the file specified. The system cannot find the file specified. Using CATALINA_BASE: "C:\Users\xxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-" Using...

CommandButton execution while rendering

Question: How can I prevent the execution of a while the website is rendering? Thats where my Button sits: <p:dialog widgetVar="newComment" height="200" width="500"> <h:form> <h:panelGrid> <h:outputText value="#{commentDialog.username}" /> <h:inputTextarea id="in_text" value="#{commentDialog.text}" /> <p:message for="in_text" /> </h:panelGrid> <p:commandButton validateClient="true" value="Abschicken" ajax="true" actionListener="#{popupRequestView.update}"...

Trying to setup tomcat to use servlets

I'm following instructions found in Java All in one for Dummies 3rd edition I downloaded tomcat and followed all the steps for setting it up, step 6 says. "Modify the web.xml file to enable the invoker servlet" It says to find the lines of code for the invoker and then...

how stick out a menu when clicking on a menu [on hold]

I have a type of menu created in JSF. <p:menubar styleClass="menuPrincipal" id="menuBar" > <p:menuitem value="Inicio" url="/Inicio.xhtml" style="text-decoration:none" icon="ui-icon-home" id="inicio" /> <p:menuitem value="Agregar Excepciones" id="agregarExcepcion" url="/ExcepcionNuevo.xhtml" style="text-decoration:none" rendered='#{excepcionPendienteView.usuarioActual.tipoSolicitante eq "Administrador"}' /> </p:menubar> I want that when you click on a menu, highlight the option me where I am working. if I...

selectonemenu, when editable=false, cannot submit the form

My form is working if editable is set to true but not when it's false. When false the submit action method is not even called. I need it to be false (not editable so I can store the correct value in db). This is the menu I added. <tr><td> <h:outputLabel...

confirmDialog is not taken the new value of the selectOneMenu

I need to change the status in database but when I change the status the confirmDialog is not taking the new value, it gets the old one <p:selectOneMenu converter="omnifaces.SelectItemsConverter" disabled="#{myBB.currentStatus != StatusEnum.TEMP}" id="statusSOM" onchange="PF('confirm').show();" value="#{myBB.currentStatus}" widgetVar="statusWV"> <f:selectItems itemDisabled="#{status == StatusEnum.ALL}" itemLabel="#{msgs[]}" itemValue="#{status}" value="#{myBB.statusList}" var="status" /> </p:selectOneMenu>...

Placing secure data in Java web application

The question is about security in tomcat, but first consider the following example: Suppose you have apache web server. Then, under www folder, create folder named dist, and under folder dist create folder named bdf23b1c-ddd3-4d5b-8fdf-948693674011. Under this folder create some file with secure information. For example, some private picture you...

Spring boot war file deploy on Tomcat

I use Spring Boot 1.2.4.RELEASE with gs-rest-service source file. I got: - - [18/Jun/2015:09:59:25 +0300] "GET /gs-rest-service-0.1.0/ HTTP/1.1" 404 1021 There are no other exceptions in Tomcat logs. I have read related questions, but my test doesn't run. Spring Boot War deployed to Tomcat I have read howto-create-a-deployable-war and...

How to use two port numbers for a single java web application?

I am working in a java web project in Eclipse IDE. project is working fine and we use Apache tomcat 7 as server. Now to access the application we use the URL as localhost:8080/APPNAME/. It works fine. In my project there is a servlet, that will request by other java...

Tomcat 7 PermGen Space or Failed to Create JVM

I'm currently searching for any help about this. I'm trying to start a Tomcat 7 server, but I only get PermGen Space exception. I tried to change the XXMaxPermSize value, but when I change it, I get a Pop Up at launch of my Eclipse : "Failed to Create the...

Tomcat servlet the requested resource is unavailable

I am very unfamiliar w/ servlets and have been asked to write a simple a simple program on tomcat 7 using java. I wrote a very simple hello world program and haven't been able to get it running and need some help. import*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*;...

Express.js server with Apache Tomcat

I am making a sample web application in node.js using express.js. I am getting a little confused when using apache-tomcat as my web server. I have two doubts: When i run apache-tomcat as a web server and my express.js server is providing me services at port number 4000, how does...

How to get some utf-8 characters using hibernate and spring mvc in database?

I have developed small server program. When I extract tuple from database, some characters become ÇѱÛÃàÁ¦. I modify server.xml. However ÇѱÛÃàÁ¦ characters still appear. Help me. How can I get correct characters? This is my server.xml. (I use apache tomcat 7.0 server.) <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache...

Dynamic rendering - unable to find component with clientId

I am rendering a xhtml to a dialog whose components are added dynamically from server side using Dynamic example. Using PrimeFaces 5.1, JSF 2.1 Mojarra and tomcat 7. When i click the close button of the pop up a large number to of unable to find the component is being...

Primefaces: Dialog with inputTextarea not updating controller's variable

I have this Dialog: <p:dialog header="Ingrese Comentario" widgetVar="dlg1" appendTo="@(body)" modal="true" position="top" hideEffect="fold" showEffect="fold" closable="true" draggable="true" > <h:form id="d_ingresarComentario"> <h:panelGrid columns="2"> <p:inputTextarea value="#{tareaController.comentarioNuevo.comentario}" rows="7" cols="60" placeholder="Ingrese su comentario aquí" counter="display1" maxlength="200" counterTemplate="{0} Caracteres faltantes." > </p:inputTextarea> <br/>...

Refresh selection model of p:datatable on row deselection

I have a problem with the selection model of a Primefaces 5.0 datatable. This selection model does not process deselection properly: Selection of rows adds these roles as expected to the list of selected rows. But a deselection has no influence on this list; deselected rows remains in it. Only...

Spring Boot configure a Domain/Host to access in a fashion

I have a spring boot application. Usually I run my Spring applications on PaaS instances, and configuring a domain name from there is easy enough, however I am running this on a Virtual Private Server, and I cannot, for the life of me, figure out how to run my spring...

Wildcard with Service Stop/Start

I know we could do this in VBS, PowerShell, etc. However, we do not want to do this with another language other than good ol' batch script. Have figured out the following: TASKKILL /F /IM "tomcat*" And this will forcibly kill/stop any persistent instances of Tomcat. Also, this would cover...

CORS Request Error Tomcat 7 & Java Servlet

I somehow can't get this to work. I have a Java Servlet running on a Tomcat 7 Server (running on localhost:8080) and I want to make a PUT-Request from a different Webservice (running on localhost:80). I have added the CORS-Accept-Header in the Servlet-Code as well as in the Tomcat Configuration,...

access tomcat deployed application (aws) by domain name (

I am new to aws hosting, please help me out in pointing the domain name to tomcat hosted application. During configuration following steps are taken- 1- I have created ec2 ubuntu instance. Configured with java, tomcat. Deployed my war files on tomcat. I am able to access the application successfully....

Spring Boot War file gets 404 on ec2

I put together a simple Eclipse Spring Boot Rest program. Just a couple of endpoints that return some stings. I am building it with the Eclipse Gradle plug-in. No problems, it runs fine in the Eclipse provided Tomcat instance. I also ran it on a native windows Tomcat. I deployed...

how to manage multiple war application in tomcat server?

I use tomcat as web server,I want to deploy many same war file in tomcat server with different config. How to do this in the best way possible manner? So I want to run tomcat server per each war application, my means is tomcat1 handle the .war1 in webapp and...

Use JSF, JPA, JTA, JAAS, CDI, Bean Validation with Tomcat? [closed]

Is it possible to use the following APIs with tomcat (as a lightweight server): JSF, JPA, JTA, JAAS, CDI, Bean Validation. ...

Idea 14 - Maven 3 - pass parameters

I am looking for most efficient way to pass parameters to maven through idea 14 (I have just started working with idea). When I want to compile and deploy my application through maven itself, I just run this command mvn clean package tomcat7:redeploy -P localhost -Daugage_env=local. I dont know, how...

Putting inside a causes “weird” display

I want to create dynamic forms with ajax update on event. Therefore dynamic-id is important. However, binding the id attribute to a bean value causes Empty Id exception. I saw one of the stackoverflow questions that suggests use html. So I used span. The xhtml code is as follows: <?xml...

How to Setup a Docker Tomcat Container on Mac OS X

I'm new to Docker... From my understanding, Docker is only compatible with Linux, is it possible to run docker for development purposes on a Mac? I installed virtualbox using homebrew and have tried to create a virtualbox instance. I installed docker, but am having trouble getting my mac to communicate...

Tomcat 7.0 + Chrome dont show JSON

Iam using Dynamic Web Project 2.5, Jersey and Tomcat 7.0 to create a Java Restful Webservice. I want to response JSON if someone request data. But i always get the following error from Tomcat: That my configurations in relation to web.xml and annotations are ok is demonstrated by using xml...

Tomcat v7.0 Server at localhost failed to start (Only with specific WebApp)

I get the above error when I'm trying to start the server. Important note, for any other Web Apps the server starts just fine. It's just this particular Web App that does not work. Here is the complete stack trace: SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed...

Get the currently used protocol name from HttpServletRequest?

I'm constructing a new URL in a Spring MVC controller, to be passed back to the client. Currently I'm trying this: // httpRequest is the current HttpServletRequest new URL(httpRequest.getProtocol(), httpRequest.getServerName(), httpRequest.getServerPort(), httpRequest.getContextPath().concat("/foo/bar.html")); Problem is that httpRequest.getProtocol() gives me "HTTP/1.1" instead of just "HTTP". I can trim it but wondered if...

CAS Redirect Loop

I am trying to get the CAS setup up and running and I am pretty new to this. I am following through the standard steps similar to this video. I have created keystore file Created a certificate Imported it successfully and add to cacerts file I have made the necessary...

How to use a local tomcat version with maven

This may have been asked before (if it is please link me), but when I search I'm finding a bunch of how to run maven on tomcat, how to hook up an IDE to do this (nearly all of them are ide / configuration questions), how to use maven plugin...

Axis2 keeps generating files in temp folder when running on tomcat

When deploying a web application on tomcat which uses Axis2 for SOAP communication, then in the tomcat temp directory 'apache-tomcat-6.0.29\temp' we keep getting a folder such as 'axis2-tmp-21936.tmp' holding jars for the deployed Axis2 modules such as Rampart (for e.g. axis21098rampart-mar-1.5.1.jar). The files keep growing until they fill up your...

Cannot find a package in yum repo list

I'm looking for tomcat-native (Centos 6) $sudo yum install tomcat-native No package tomcat-native available. Error: Nothing to do How do I update the yum repository list?...

How to shutdown a Tomcat's instance that wont shutdown? [duplicate]

This question already has an answer here: TomEE starts but Netbeans gives “Failed to start” error 3 answers I'm trying to use a new installation of TomEE as a local server in Netbeans but there's another instance of Tomcat that will never shutdown no matter how many times I...

Tomcat support for HTTP/2.0?

Does anyone know what is the lowest version of Tomcat that supports HTTP/2.0? I've been looking everywhere on their site and I cannot find any details regarding this.

Include different file with primefaces

I'm trying to include different file according to the type of my java object. I'm doing something like that : <p:panelGrid rendered="#{adapter.habitation}" > <ui:include src="./habitation.xhtml" /> </p:panelGrid> <p:panelGrid rendered="#{adapter.animas}"> <ui:include src="./animals.xhtml" /> </p:panelGrid> But all my cases throw an exception because it's trying to resolve all xhtml files. Any idea...