railo-context/admin/web.cfm missing css in railo deployed in resin

1k views Asked by At

I have deployed the railo war file in a resin appserver and after deployment the jvm log shows

railo-server-root:/var/resin/webapps/railo-4.2.1.008/WEB-INF/lib/railo-server
===================================================================
SERVER CONTEXT
-------------------------------------------------------------------
- config:/var/resin/webapps/railo-4.2.1.008/WEB-INF/lib/railo-server/context
- loader-version:4.3
===================================================================


===================================================================
WEB CONTEXT (3ccbecdfdd85a2c229a64e875ca4821a)
-------------------------------------------------------------------
- config:/var/resin/webapps/railo-4.2.1.008/WEB-INF/railo
- webroot:/var/resin/webapps/railo-4.2.1.008/
- hash:3ccbecdfdd85a2c229a64e875ca4821a
- label:3ccbecdfdd85a2c229a64e875ca4821a
===================================================================

I can access a test index.cfm page kept at /var/resin/webapps/railo-4.2.1.008/index.cfm by calling http://domain.com:8080/railo/index.cfm

But when I try to access http://domain.com:8080/railo/railo-context/admin/server.cfm or http://domain.com:8080/railo/railo-context/admin/web.cfm . It is loading a page with no css etc .

I also see the following error in the log Wed Nov 19 02:15:51 EST 2014-311 class railo.runtime.instrumentation.Agent.getInstrumentation() is not returning a Instrumentation static resource /railo-context/res/css/admin42.css.cfm was not found @ /var/resin/webapps/railo-4.2.1.008/-context/res/css/admin42.css static resource /railo-context/res/css/admin42.css.cfm was not found @ /var/resin/webapps/railo-4.2.1.008/-context/res/css/admin42.css static resource /railo-context/res/css/admin42.css.cfm was not found @ /var/resin/webapps/railo-4.2.1.008/-context/res/css/admin42.css

What am I doing wrong

2

There are 2 answers

1
Brad Wood On BEST ANSWER

In your URL domain.com:8080/railo/railo-context/... is the first railo the context path? Basically, did you deploy a Railo war but not in the / context?

If so, you might need to modify the /railo-context/ virtual mapping in your railo-server.xml file to map to "/railo/railo-context/"

Also, check any rewrite rules set up.

1
Steve Withington On

Railo (not sure which version, but one of the 4.x ones) moved the admin resources (i.e. css, images) out of the same folder as the rest of the admin, meaning they're no longer in /railo-context/, and they now use paths like ../res/bar.css to load them.

Our fix was to add a proxy/rewrite for that other directory, too. For example:

ProxyPassMatch  ^/my-secret-railo-location/admin/(.*)$ ajp://localhost:8009/railo-context/admin/$1
ProxyPassMatch  ^/my-secret-railo-location/res/(.*)$ ajp://localhost:8009/railo-context/res/$1