Reading time: < 1 minute

Just found it on my old ColdFusion installation and thought it might be useful for someone in a multiple Jrun installations environment.

<cfscript>
    //Instatiate JRUN
    jrunObj = createObject("java", "jrunx.kernel.JRun");
    //Get it's name
    thisServer = variables.jrunObj.getServerName();
    You're on #thisServer#
</cfscript>

2 Responses to “What’s Jrun’s name?”

  1. David says:

    Hey, thanks for that!
    btw, your code snippet has CF comments inside a cfscript…
    maybe us "//" instead of "<!— —>"?

  2. Yeah you’re right David. I just added this comments when adding the post to the blog. It’s fixed now. That give’s me an idea. I’ll work on something to validate code to be posted on blogCFC.

    Cheers

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>