How to put hook up listener not on webroot in a shared hosting

6 views
Skip to first unread message

vegiecat

unread,
Nov 24, 2009, 3:28:41 AM11/24/09
to Mach-II for CFML
Hi All I have 2 questions,

I'm currently trying to setup a machii application that's on a share
hosting who provides the following folder structure:
-/ (most bottom folder)
-web (webroot)

and I want to keep what's only necessary in the webroot so I am
planning to do this:
-/ (most bottom folder)
-web (webroot)
-config folder (which has mach-ii.xml)
- css folder
- img folder
- application.cfc
- index.cfm
- appName folder
- listener folder
- models folder
- views folder

and in the mach-ii.xml i have:
<properties>
<property name="applicationRoot" value="/../appName" />
and other properties
</properties>

<listeners>
<listener name="xxx" type="appName.listeners.xxx"> </listener>
</listeners>
but I get the error:
Could not find the ColdFusion Component or Interface

i then tried to use per app mapping in application.cfc
<cfset this.mappings["/appName"] = getDirectoryFromPath
(getCurrentTemplatePath()) & "..\appName" />
still no luck.
seems machii is starting to look for the listeners starting from the
webroot/listeners/ and not from a higher folder.

Any tips I can do or try ?

and my second question is where can I find a good tutorial to
coldspring? I've been looking around, I was kinda confused on how it
hooks up with machii...

any suggestions would be greatly appreciated. Thanks all~!

Yours,
Jimmy

Brian Klaas

unread,
Nov 24, 2009, 9:16:17 AM11/24/09
to Mach-II for CFML
Hi Jimmy -

For and introduction to ColdSpring, look here:

http://coldspringframework.org/coldspring/examples/quickstart/

For information on how ColdSpring and Mach-II work together, look
here:

http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/UsingColdSpringWithMach-II

As for your core problem, can you ensure that your host allows
mappings? Some CF hosts do not. Alternatively, if you can specify an
absolute path in your mapping, that may work as well.

brian

Matthew Woodward

unread,
Nov 24, 2009, 10:12:57 AM11/24/09
to mach-ii-for...@googlegroups.com
On Tue, Nov 24, 2009 at 12:28 AM, vegiecat <vegi...@gmail.com> wrote:
and in the mach-ii.xml i have:
       <properties>
               <property name="applicationRoot" value="/../appName" />
               and other properties
       </properties>


The "/../appName" bit seems odd to me. That says "go to the web root, then go one level up, then into an 'appName' directory." Chances are your host doesn't let you go outside your webroot.

If / doesn't get you to your webroot and they don't allow for mappings, unfortunately you may have to do a search and replace on the framework code. Since we're on the topic of shared hosting, this has come up before but you cannot use Mach-II on shared hosts that don't allow CreateObject("java"). Just throwing that out there in case others run into this problem.

--
Matthew Woodward
ma...@mattwoodward.com
http://mpwoodward.posterous.com
identi.ca/Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint, etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

Jimmy Chen

unread,
Nov 30, 2009, 9:02:59 AM11/30/09
to mach-ii-for...@googlegroups.com
thank you for your inputs. those tips were very helpful =) yours, Jimmy


--
You received this message because you are subscribed to Mach-II for CFML list.
To post to this group, send email to mach-ii-for...@googlegroups.com
To unsubscribe from this group, send email to mach-ii-for-coldf...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/

Reply all
Reply to author
Forward
0 new messages