Skip to main content
Inspiring
July 6, 2007
Question

Confused about jrun-web.xml

  • July 6, 2007
  • 5 replies
  • 2310 views
G'day there
I'm hoping someone can clarify the *actual* purpose of the
[cf]/WEB-INF/jrun-web.xml file, and how CF uses it.

My understanding of it was that it was the JRun-internal-webserver's
equivalent of Apache's httpd.conf, or IIS's... err... whereever IIS stores
its config. Basically a web server configuration file. So if one wasn't
actually USING the JRun webserver for a given web site, then that file is
just ignored.

However that understanding is incorrect, it seems.

I have this sort of set-up on my dev machine's file system:

C:\webroots
\webapp1root
\lib
\subapp
\myCfc.cfc
\webapp2root
\lib
\subapp
\myCfc.cfc

And my IIS default website (I'm just running XP Pro, so only one website @
a time) is set up to have either webapp1root or webapp2root as its webroot,
depending on which I am working on, at a given moment in time. And the
website also has a virtual directory to "subapp", called... "subapp".

Currently I'm working on webapp1, so was bemused that when I did this:

createObject("component", "subapp.myCfc")

I was getting an instance of C:\webroots\webapp2root\lib\subapp\myCfc.cfc
created, instead of the webapp1 version.

I spent rather too long ballocksing around checking virtual directories, CF
mappings and all that sort of palarver, only to eventualy find that I had a
residual mapping in my jrun-web.xml file pointing to webapp2root's subapp
directory.

Once I removed that: all good.

Now to me, jrun-web.xml should be completely irrelevant to that mix, as I'm
not using the JRun web server.

So obviously it's NOT just a web server config file. WTF *is* it?

I have read various docs on the Adobe website, but they all seem to be
written for an audience who would already know what the author is on about
(hence making the doc a bit of a waste of time, in my view), and it's all
completely impenetrable for me, as I'm just a CF developer and haven't got
a clue about the inner workings of JRun (and, to be frank: I'd like to keep
it that way if poss... JRun knowledge is not exactly a marketable skill
;-).

What am I missing here?

--
Adam
    This topic has been closed for replies.

    5 replies

    Inspiring
    July 7, 2007
    Adam Cameron wrote:
    >> Where do you suppose the IIS connector gets its configuration
    >> information? :)
    >
    > Beyond "send all CFM requests to [this] port, and expect a response back at
    > some stage", I'm not sure what "configuration" it would need?

    The connector works in two ways, it sends certain extensions (configured
    with -map on the wsconfig command) to JRun and it does pattern matching
    in the wildcard connector. For the latter it needs to know what is
    mapped to servlets and what is not, i.e. the information in web.xml.

    Jochem

    --
    Jochem van Dieten
    Adobe Community Expert for ColdFusion
    Inspiring
    July 7, 2007
    > their
    > application mappings too

    THEY'RE application mappings too.

    oops.

    --
    Adam
    Inspiring
    July 7, 2007
    > Where do you suppose the IIS connector gets its configuration
    > information? :)

    Beyond "send all CFM requests to [this] port, and expect a response back at
    some stage", I'm not sure what "configuration" it would need?

    IIS maintains its own virtual directories, after all.

    But, sure... if those mappings aren't *just* web server mappings, their
    application mappings too: IIS would need to know about them. It's that
    part that I didn't get (for the reasons stated in my previous post).

    Cheers.

    --
    Adam
    Inspiring
    July 7, 2007
    Adam Cameron wrote:
    >
    > Now to me, jrun-web.xml should be completely irrelevant to that mix, as I'm
    > not using the JRun web server.
    >
    > So obviously it's NOT just a web server config file. WTF *is* it?

    Where do you suppose the IIS connector gets its configuration
    information? :)

    Jochem

    --
    Jochem van Dieten
    Adobe Community Expert for ColdFusion
    July 6, 2007
    Sod it: that filesystem ock-up lost it's indent. Try this:

    C:\webroots
    ----\webapp1root
    --------\lib
    ------------\subapp
    -----------------\myCfc.cfc
    ----\webapp2root
    --------\lib
    ------------\subapp
    -----------------\myCfc.cfc

    --
    Adam
    Participating Frequently
    July 6, 2007
    jrun-web.xml is the JRun-specific J2EE Web App Deployment Descriptor. The J2EE spec defines a standard deployment descriptor that all J2EE App Servers must use, called web.xml. If the app server wants to add anything additional above and beyond the spec, they must do so in separate files. In this instance, JRun named their file jrun-web.xml.

    ColdFusion, installed Standalone or Multiserver, runs on JRun. All CF is now is a J2EE Web Application. When you are using IIS, you are using an ISAPI filter that connects to JRun, which itself deployed the ColdFusion Web App.

    Therefore, even though you're not using the built-in web server, jrun-web.xml is very much involved. Without jrun-web.xml, the ColdFusion web app (which is actually JRun that you're trying to start up) wouldn't start.