Resolving Coldfusion J2EE sessions with ajax calls to cfc methods using verifyclient -



Resolving Coldfusion J2EE sessions with ajax calls to cfc methods using verifyclient -

i utilizing cf session management , have been investigating transitioning utilizing j2ee session management. in attempts so, ajax requests made ( when cfsession management set utilize j2ee sessions ) cf chlorofluorocarbon remote methods fail verifyclient authorization. code below works when session management uses cf session management.

my assumption _cf_clientid no longer right value pass remote method - generated using cfid , cftoken.

how implement j2ee session management , utilize remote chlorofluorocarbon methods verifyclient? or can not done? using cf tag cfajaxproxy not option.

the illustration code below demonstrates how utilize jquery ajax phone call remote chlorofluorocarbon method verifyclient='true', though cf documentation indicates utilize of cfajaxproxy required. not case. (thanks ray camden , dwmommy. ) leads me believe there may work-around implement similar method verifying client when using j2ee sessions.

thanks in advance!

<script src="/plugins/jquery-1.7.2.min.js" type="text/javascript" language="javascript"></script> <cfajaximport /> <script> $(function() { $.ajax({ url: 'test.cfc', type: 'get', datatype: 'json', data: { method: 'sayhello', yourname: 'foo' ,_cf_clientid: _cf_clientid }, success: displaysearchresults }); }); </script> <script> function displaysearchresults(res){ $('#searchresults').html( res ); } </script> <div id="searchresults"></div>

test.cfc

component{ remote function sayhello ( string yourname = 'anonymous') returnformat='json' verifyclient='true'{ homecoming 'hello ' & arguments.yourname; } }

ajax coldfusion remote-access

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -