JSP Newbie:
I have a piece of code that works perfectly within the <% %> brackets but I need it to work within the <%! %> brackets.
Here is the code:
------------------------
com.newatlanta.cfc.CFCProxy myCFC = new com.newatlanta.cfc.CFCProxy("xmpp", request, response);
String jsonMsgData = "A test message";
Object[] myArgs = {jsonMsgData};
java.util.Map map = (java.util.Map)myCFC.invoke("OnAvailabilityChange", myArgs);
-------------------------
I am working with XMPP / Jabber using Smack and I need for this piece of code to be triggered when there is a change in user presence. I already have the trigger code working within the <%! %> brackets and just need to plug this piece in it to be executed. Right now, what I have the trigger code doing is sending me an IM of the user presence. I want to replace the "IM message code" with the above code to be executed.
Obviously the code above is some sort of servlet and I know it works for sure -BUT ONLY- within the <% %> brackets as mentioned previously. Is there a way I can call that piece of code a as a function like doCFCProxy(arg1, arg2...); into the trigger code (that is surrpunded by <%! %>)?