Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection between coldfusion server and another remote server

Status
Not open for further replies.

arunesh1

Programmer
Aug 11, 2000
1
0
0
Hi Everybody,<br>I am working as coldfusion developer. <br><br>I am facing problem in my project:<br><br>Our coldfusion server need to communicate with another company's server so that they can track user's activity.<br><br>For this ,that company have given certain steps to<br>communicate with their server , that sample code is in<br>Java.<br><br>In sample java code they say that incorporate similar<br>type of code in AppsServercode to only once and should<br>be executed upon AppsServer startup to connect to<br>their server.<br><br>When I asked that company's people, then they told me that they donot have much knowledge of coldfusion but with respect to ASP he told me that it should be coded in to Global.asp where all the global variables are defined.So I think in case of cold fusion it is application.cfm .<br><br>But questions are:<br><br>1&gt;How to embed java code in coldfusion templates?<br><br>2&gt;Should I embed that code in Application.cfm,because<br>Application.cfm get executed every time a coldfusion<br>page is requested, in&nbsp;&nbsp;their sample they told that it<br>should be incorporared only once and should be<br>executed upon AppsServer startup?<br><br>If any of you can send any solution so that i can do two way communication between two servers , I will really appreciate .<br>Thanks<br>Regards<br>
 
There are many levels of comunication between servers.<br><br>1) What type of communication are you trying to use?<br>2) Are you trying to execute Java or embed a Java applet?<br><br><br>But, you could do something like this:<br><br>This code can be used in Application.cfm and will only run once and can be accessed anywhere within the scoped applicaion defined iby your &lt;cfapplication&gt; tag.<br><br>&lt;cfif NOT isdefined(&quot;Application.AppServVar&quot;)&gt;<br>Do your code here...............<br><br>&lt;cflock scope=&quot;APPLICATION&quot; timeout=&quot;20&quot; type=&quot;EXCLUSIVE&quot;&gt;<br>&lt;cfset Application.AppServVar = &quot;True&quot;&gt;<br>&lt;/cflock&gt;<br><br>&lt;/cfif&gt;<br><br>Please note that Application variables are accessable to all clients/.CFM pages within the scoped application. <p>Brian Hayes<br><a href=mailto:brian.hayes@eallowed.com>brian.hayes@eallowed.com</a><br><a href= allowed, but only if you go for it!</a><br>
 
If all they need to do is track users activity on a website, then you simply need to send that user info back to their server on every page.<br><br>You could for example stick an img tag on every page that calls a script on their server and passes the client info.<br><br>&lt;img src=&quot;<A HREF=" TARGET="_new"> variable here&quot;&gt;<br><br>And you added variables can be the page the user is visiting, the referer, IP address or whatever they need.<br><br>Or you could use CFHTTP in the application.cfm or many other ways.<br><br> <p>Russ Michaels<br><a href=mailto:russ@satachi.com>russ@satachi.com</a><br><a href= Internet Development</a><br>For my personal book recommendations visit <br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top