I have this following simple scenario:

I have created a JBossAS7 application on OpenShift. I have an index.jsp that calls a Java Class every time it's loaded. This Java class gathers some data and saves it as a string. What I want to do now is get the text contained in that String, but NOT have it displayed on the page.

What I need is a mechanism like RMI or a socket that I can connect to and simply receive the String using a client program. Unfortunately, OpenShift blocks all ports and I cannot use RMI or sockets to bind to anything (I always get permission denied).

Is there a way to solve this?
Thanks!