Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
ColdBox Interceptors SES Config Path
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeff Chastain  
View profile  
 More options Jul 9, 3:01 pm
From: "Jeff Chastain" <li...@admentus.com>
Date: Thu, 9 Jul 2009 14:01:59 -0500
Local: Thurs, Jul 9 2009 3:01 pm
Subject: ColdBox Interceptors SES Config Path

I have been digging through the different settings in the coldbox.xml to see
how things work and I came across something with the configFile path
property for the SES Interceptor.  On line 40 of the ses.cfc interceptor,
any leading slashes are stripped off of the config file path before it is
used.  Can somebody explain why this is as this prevents the configFile path
property from being set using a ColdFusion mapping?

Thanks

-- Jeff


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
whostheJBoss  
View profile  
 More options Jul 9, 6:24 pm
From: whostheJBoss <dotfus...@changethings.org>
Date: Thu, 9 Jul 2009 15:24:21 -0700 (PDT)
Local: Thurs, Jul 9 2009 6:24 pm
Subject: Re: ColdBox Interceptors SES Config Path
I believe this is the line you are talking about:

                        configFilePath = configFilePath & reReplace(getProperty
('ConfigFile'),"^/","");

The reReplace(getProperty('ConfigFile'),"^/","") removes just the
leading slash, configFilePath's previous value is still added on to
the beginning.

Notice that configFilePath is prepended to this reReplace, so your
appMapping (which should contain your ColdFusion mapping) is what will
contain this part of the mapping and is tacked on to the beginning of
the configFile after it has its slash removed. Since it is prepended,
then your CF mapping will also be prepended.

It is set at the beginning of config:

                        var configFilePath = "/";

So that slash will always be there, then if appMapping is populated,
it is added on to this configFilePath here:

        if( getController().getSetting('AppMapping') neq "" ){
                                configFilePath = configFilePath & getController().getSetting
('AppMapping') & "/";
        }

I did a quick test (on my Windows box right now) by adding this
function to write the progression of the configFilePath to a file.

<cffunction name="writeOut" access="public" returntype="none"
output="true">
        <cfargument name="outputVar" type="string">
        <cfif #arguments.outputVar# is 'clear'>
        <cffile action="write" output="" file="c:\test.htm"
nameconflict="overwrite">
        <cfelse>
        <cffile action="append" output="<br>#outputVar#" file="c:\test.htm">
        </cfif>
</cffunction>

And then modifying configure to write to it...

<cfscript>
                        writeOut('clear');
                        var configFilePath = "/";
                        writeOut('1.) ' & configFilePath);

                        /* If AppMapping is not Blank check */
                        if( getController().getSetting('AppMapping') neq "" ){
                                configFilePath = configFilePath & getController().getSetting
('AppMapping') & "/";
                        writeOut('2.) ' & configFilePath);
                        }
                        /* Setup the default properties */
                        set_courses( ArrayNew(1) );
                        setUniqueURLs(true);
                        setEnabled(true);

                        /* Verify the properties */
                        if( not propertyExists('configFile') ){
                                throw('The configFile property has not been defined. Please define
it.','','interceptors.ses.configFilePropertyNotDefined');
                        }

                        /* Setup the config Path */
                        writeOut('3.) ' & configFilePath);
                        writeOut('4.) ' & getProperty('ConfigFile'));
                        writeOut('5.) ' & reReplace(getProperty('ConfigFile'),"^/",""));
                        configFilePath = configFilePath & reReplace(getProperty
('ConfigFile'),"^/","");
                        writeOut('6.) ' & configFilePath);
                        /* We are ready to roll. Import config to setup the routes. */
                        try{
                                include(configFilePath);
                        }
                        catch(Any e){
                                throw("Error including config file:
#e.message#",e.detail,"interceptors.ses.executingConfigException");
                        }

If you do this this, you'll see that the appMapping is maintained,
then added back to the configFilePath.

Sorry if I wasn't clear, but it seems to be working as intended for
me...

If your CF mapping is defined in the appMapping, then it will
definitely be appended to the beginning.

On Jul 9, 12:01 pm, "Jeff Chastain" <li...@admentus.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Chastain  
View profile  
 More options Jul 10, 9:53 am
From: "Jeff Chastain" <li...@admentus.com>
Date: Fri, 10 Jul 2009 08:53:18 -0500
Local: Fri, Jul 10 2009 9:53 am
Subject: RE: [coldbox:3007] Re: ColdBox Interceptors SES Config Path
whostheJBoss,

My mistake, I misread that line of code.  It would appear that the issue is
actually with my AppMapping setting, so I will have to play with that one to
see what the right path should be.

Thanks for the clarification.
-- Jeff


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google