also when I browse to the cb dashboard, I do not get any styles or
images...
I'm not sure if I have to do anything different, but I've setup railo/
resin running with apache, and also setup a vhost pointing to my newly
created cb app.
here's my stack trace:
invalid component definition, can't find coldbox.system.coldbox
at railo.runtime.component.ComponentLoader.loadComponentImpl(Unknown
Source):-1
at railo.runtime.ComponentImpl.init(Unknown Source):-1
at application$cfc.initComponent(/Users/sal/Sites/railo_test/
Application.cfc):-1
at application$cfc.newInstance(/Users/sal/Sites/railo_test/
Application.cfc:16):16
at railo.runtime.component.ComponentLoader.a(Unknown Source):-1
at railo.runtime.component.ComponentLoader.loadComponentImpl(Unknown
Source):-1
at railo.runtime.listener.ModernAppListener._onRequest(Unknown
Source):-1
at railo.runtime.listener.MixedAppListener.onRequest(Unknown
Source):-1
at railo.runtime.PageContextImpl.execute(Unknown Source):-1
at railo.runtime.engine.CFMLEngineImpl.serviceCFML(Unknown Source):-1
at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
at javax.servlet.http.HttpServlet.service(HttpServlet.java:91):91
at com.caucho.server.dispatch.ServletFilterChain.doFilter
(ServletFilterChain.java:103):103
at com.caucho.server.webapp.WebAppFilterChain.doFilter
(WebAppFilterChain.java:175):175
at com.caucho.server.dispatch.ServletInvocation.service
(ServletInvocation.java:240):240
at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:
424):424
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:481):
481
at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:685):685
at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:607):607
at java.lang.Thread.run(Thread.java:613):613
This is necessary to run anything that resides outside of the application’s web root. Doesn’t matter if it’s ColdBox, ColdSpring, Transfer, or BillyJoeBobsSuperDuperBadAssFramework. If it resides outside of the web root, it must be mapped.
NOTE: You can also setup a Virtual Directory (IIS) or an Alias (Apache), but that is a horrible “solution” because you’ve now made the entire framework code browsable via the web.
"This is necessary to run _anything_ that resides outside of the
application's web root."
how do you figure? when running coldbox with adobe CF8, there is no
mapping necessary, also Im a bit confused on what you mean by
application's web root? The "application servers" web root? and if
that's the case, I do have coldbox in the web root...
then everything that is served from that site must either reside under that location, or be mapped. Without a mapping, no web server or application server in the world can serve those files if they reside elsewhere.
From what you’re saying it sounds to me as though you have everything in your web root, which is why it “works”. But the only reason it “works” is that it resides in the web root. For instance, if you are running IIS, the default web root is something like
and you browse to http://localhost/mycoolwebsite/index.cfm, the reason it “works” is because you have both coldbox and mycoolwebsite in the web root. Try moving those elsewhere and see what happens.
Since your Railo install is not on IIS (not sure that Railo even supports IIS), your web server root and your project (application) root are not in the same location. Therefore, a mapping is necessary. That’s the way every single application and/or web server on the planet works. It has nothing to do with Railo vs. Adobe ColdFusion or ColdBox or IIS or Apache or JBoss or anything else. A mapping is required if you’re using files that don’t reside in the application/project’s web root.
however my railo install, I believe *is* on Apache, so my web servers
root is "~/Sites" and I tried setting my root on the resin conf file
to be pointing to the same root, which probably confused me on why I
had to setup a mapping... It's no big deal, I now have my coldbox test
application running under Railo (which is SUPER sweet).
however, after adding the mapping to the server admin, I still do not
get any styles or images in the coldbox admin interface... My
application is working just fine.
thats what I thought!! I don't particularly like creating mappings if
I don't have to as well...
Luis, do you have to create a mapping to the framework (coldbox
directory) in your webroot?
mmh, I changed recursively my coldbox directory to 755, and still
nothing, no styles/images...
Is it that you are trying to access the ColdBox _dashboard_ from your website? ("coldbox admin interface")
And that this dashboard (including js, css, and images) are stored in the coldbox folder which is outside of your web root?
I don't see how you could get the non-CF parts of the dashboard WITHOUT a web server mapping. (with one exception)
The ColdFusion mapping will be enough for your server to find the .cfm or .cfc files, but when your browser requests a JPG. the web server generally serves that content without ever bugging the app server.
What is an example of an image, or js file that won't load? Plug that path into your URL all by itself. If you are getting a 404 (which I suspect you are) then it shouldn't have anything to do with permissions.
I'm not totally familiar with the admin interface you are speaking of, but if it is in a folder which is not web-accessible, you have two options. Map a virtual directory in your WEBSERVER, or move that directory into your web root. If it helps, you shouldn't need to make a mapping for the entire coldbox folder, just the dashboard folder.
Hrmm.. I just saw your last reply about the port number. If that worked, then I'm not sure what is going on. What port are you using? 80? The only time I have seen CF serve non-CF content (the exception I mentioned above) was when using the built-in web server in Adobe Coldfusion with a mulitserver install, where ALL files were associated with JRUN and passed through CF and therefore following CF mappings. Of course, since you're on Railo and Apache, that's sort of outside of my experience.
I'm not really sure what's going on with salomoko's install,
especially without knowing the details for how he set up his Apache/
Resin/Railo setup, but I just wanted to chime in on a couple of points
made:
1) As someone who is also running CB under Railo, no -- you don't need
a mapping to get ColdBox to run (if, as explained before, it's in your
site's web root).
2) To answer Tom's question -- yes, you can set up application-
specific mappings in Railo just like in CF8 in the Application.cfc.
However, it's kind of redundant for Railo to have that "feature",
since Railo provides an admin for each web site where you can set up
app-specific mappings as well as app-specific datasources and other
settings.
I used to be averse to mappings. But ever since I got my own VPS, I've
changed my tune. Having a mapping to a "central" ColdBox directory
makes it so much easier to upgrade the framework for all my sites at
once instead of having to upgrade the files for each individual site.
"you don't need a mapping to get ColdBox to run (if, as explained
before, it's in your site's web root)."
This is just not the case with me, hence my initial posting on this
thread. My cb app cannot find the core install without a mapping, I
have coldbox at my webservers root. ~/Sites, which is defined via my
httpd.conf. and in my resin.conf... Are you saying to put the coldbox
framework folder in my applications root? ~/Sites/railo_app/coldbox