[cfaussie] Re: JRun and a war application

2007-06-06 Thread Mark Stanton

Hey Andrew

I've done some work with deploying CF instances packaged as war files,
but have not worked with CF8 or Roller as war files.

> Problem one, what is the best documentation to read for setting up
> applications (war) on an instance of CF under Jrun as the help files and
> install notes on CF are a little vague unless I am not reading them right.

JRun is a J2EE server, CF is a J2EE application that can be deployed
to JRun or another J2EE server. That is subtly different to the way
you have phrased it, but the distinction is important. When you are
talking deploying war applications files you are dealing with the
underlying JRun server rather than CF.

So what documentation is best? I'd start with the JRun docs at
http://livedocs.adobe.com/jrun/4/ rather than the CF docs.

> Another problem or maybe misunderstanding on my part is that the install
> docs, talk about the connector config for URI encoding so that I can setup
> UTF-8 encoding. I do not want to assume this is a default setting, so need
> to make sure that it can accept it, or at least have a setting where I can
> set that up for this context.

I'm not sure what connector you are talking about here but UTF-8 is
probably your best bet unless you have a specific reason to pick
something different. Don't waste your time trying to set it to
ISO-8859-1 or whatever.

> And the last question, when I deploy (already done a quick test) and I am
> assuming that I have deployed from the right area in the Jrun management
> console. Is that it appears to leave the war files from the location I have
> them, is this right or am I missing or done something wrong.

There are two ways for a war based application to behave on the
server. One is to run as a single .war file (under the hood this
actually gets extracted to a temp directory and run from there) and
the other is to run extracted.

I think this is managed by the jrun.deployment.DeployerService part of
the jrun.xml file for that war application, but I can't remember the
specifics.

-- 
Mark Stanton
Gruden Pty Ltd
http://www.gruden.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
:)

On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
>
> you can loosen you seatbelt now, the ride wont be so bumpy. But the
> captain asks that you refrain from using the REQUEST scope in case there is
> any further turbulence.
>
>
> On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> >
> > Thanks Andrew and AJ. Now I understand - once an object is initialised
> > in OnApplicationStart function then it's available in every page. If the
> > object is changed or a new object is created after app start then we need to
> > reinitialise/initialise it using something like
> > http://mysite/?updateapp=true.
> >
> > On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> > >
> > > any code inside the OnApplicationStart function will only run the
> > > first time the application is run. So if you put in a new CreateObject() 
> > > you
> > > will need will need to do the ?updateapp=1
> > >
> > > If you change a CFC that has already been created and stored in the
> > > APPLICATION scope, you will also need to do updateapp=1 as the old version
> > > will still be there.
> > >
> > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > >
> > > > But I've been told if I change the object in cfc I have to init the
> > > > object again in myPage.cfm so the change'll happen. Is that true?
> > > >
> > > > On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > no, because if the APPLICATION scope does not exist OnApplicationStart
> > > > > () will be fired
> > > > >
> > > > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Thanks AJ. But for the objects, do I need to do something like
> > > > > > this on myPage.cfm?
> > > > > >
> > > > > > 
> > > > > >  > > > > > intranet.hr.survey.components.surveyDAO").init("HR") />
> > > > > > 
> > > > > >
> > > > > > in the event the object is not initialised.
> > > > > >
> > > > > > On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > As per A.S. loose (delete/remove/cut/destroy) these lines in
> > > > > > > onRequestStart
> > > > > > >
> > > > > > >  > > > > > > variables.componentPath />
> > > > > > >  > > > > > > Application.surveyGateway />
> > > > > > > 
> > > > > > >
> > > > > > > move these to OnApplicationStart
> > > > > > > 
> > > > > > > 
> > > > > > > and change request to application for the dsn
> > > > > > > 
> > > > > > >
> > > > > > > Then in you code, reference
> > > > > > >Application.surveyDAO1
> > > > > > >Application.hrSurveyObj
> > > > > > >APPLICATION.dsn
> > > > > > >
> > > > > > > So what you end up with is all the APPLICATION wide variables
> > > > > > > are defined as set in OnApplicationStart().
> > > > > > >
> > > > > > > No need to copy them into the REQUEST scope
> > > > > > >
> > > > > > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > > > Hi AJ,
> > > > > > > >
> > > > > > > > That's what I did in application.cfc (see attached file as
> > > > > > > > requested by Andrew).
> > > > > > > >
> > > > > > > > On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> > > > > > > > >
> > > > > > > > > Hi George,
> > > > > > > > >
> > > > > > > > > I think you are after something more like this:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >  > > > > > > > > createObject("component",variables.componentPath &
> > > > > > > > > ".components.surveyDAO").init(variables.dsn) />
> > > > > > > > >  > > > > > > > > CreateObject("component"," CFC.DataMgr").init("HR","MSSQL")
> > > > > > > > > />
> > > > > > > > > 
> > > > > > > > >
> > > > > > > > > 
> > > > > > > > >  > > > > > > > > required="true" />
> > > > > > > > >
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > >
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > >
> > > > > > > > > If the URL.updateapp exists - it will call
> > > > > > > > > onApplicationStart which will initialise your object for you.
> > > > > > > > >
> > > > > > > > > Then you can use Application.surveyDAO anywhere in you
> > > > > > > > > application
> > > > > > > > >
> > > > > > > > > On 6/7/07, Andrew Scott < [EMAIL PROTECTED]>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > >  Looks like Peter got to youJ
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > If you set the Object up in onApplicationStart, there is
> > > > > > > > > > no need and I mean this!! No need to copy the
> > > > > > > > > > Application.surveyDAO to the request scope.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I would really like to know who is teaching people to do
> > > > > > > > > > this, can you imagine 1000 users hitting the application 
> > > > > > > > > > and how many extra
> > > > > > > > > > ram is wasted by such a method.. Peter might like doing 
> > > > > > > > > > this and w

[cfaussie] JRun and a war application

2007-06-06 Thread Andrew Scott
Is anyone here with more knowledge than me, which isn't hard with multi
server configurations of ColdfusionJ

 

Anyway here is the scenario, I have a development server that is running an
instance of Coldfusion MX 7.02 as well as Coldfusion MX 8 (I assume this is
an MX application) and am looking at installing Roller onto one of these
instances. Now the problem is that the installation instructions I have for
Roller is mainly for tomcat.

 

So the problem that I am stuck with is many, so please bare with me.

 

Problem one, what is the best documentation to read for setting up
applications (war) on an instance of CF under Jrun as the help files and
install notes on CF are a little vague unless I am not reading them right.

 

Another problem or maybe misunderstanding on my part is that the install
docs, talk about the connector config for URI encoding so that I can setup
UTF-8 encoding. I do not want to assume this is a default setting, so need
to make sure that it can accept it, or at least have a setting where I can
set that up for this context.

 

And the last question, when I deploy (already done a quick test) and I am
assuming that I have deployed from the right area in the Jrun management
console. Is that it appears to leave the war files from the location I have
them, is this right or am I missing or done something wrong.

 

Anyway I do have other questions, but those are enough to get me going. Any
help online or offline would be of a great benefit to me.

 

Thanks in advance.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
  www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
*ROTFLMAO*

 

The funniest thing I have heard this week...



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of AJ Mercer
Sent: Thursday, 7 June 2007 3:15 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

you can loosen you seatbelt now, the ride wont be so bumpy. But the captain
asks that you refrain from using the REQUEST scope in case there is any
further turbulence.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
you can loosen you seatbelt now, the ride wont be so bumpy. But the captain
asks that you refrain from using the REQUEST scope in case there is any
further turbulence.


On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
>
> Thanks Andrew and AJ. Now I understand - once an object is initialised in 
> OnApplicationStart
> function then it's available in every page. If the object is changed or a
> new object is created after app start then we need to
> reinitialise/initialise it using something like
> http://mysite/?updateapp=true.
>
> On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> >
> > any code inside the OnApplicationStart function will only run the first
> > time the application is run. So if you put in a new CreateObject() you will
> > need will need to do the ?updateapp=1
> >
> > If you change a CFC that has already been created and stored in the
> > APPLICATION scope, you will also need to do updateapp=1 as the old version
> > will still be there.
> >
> > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > >
> > > But I've been told if I change the object in cfc I have to init the
> > > object again in myPage.cfm so the change'll happen. Is that true?
> > >
> > > On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > > >
> > > > no, because if the APPLICATION scope does not exist OnApplicationStart
> > > > () will be fired
> > > >
> > > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Thanks AJ. But for the objects, do I need to do something like
> > > > > this on myPage.cfm?
> > > > >
> > > > > 
> > > > >  > > > > intranet.hr.survey.components.surveyDAO").init("HR") />
> > > > > 
> > > > >
> > > > > in the event the object is not initialised.
> > > > >
> > > > > On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > As per A.S. loose (delete/remove/cut/destroy) these lines in
> > > > > > onRequestStart
> > > > > >
> > > > > >  > > > > > variables.componentPath />
> > > > > >  > > > > > Application.surveyGateway />
> > > > > > 
> > > > > >
> > > > > > move these to OnApplicationStart
> > > > > > 
> > > > > > 
> > > > > > and change request to application for the dsn
> > > > > > 
> > > > > >
> > > > > > Then in you code, reference
> > > > > >Application.surveyDAO1
> > > > > >Application.hrSurveyObj
> > > > > >APPLICATION.dsn
> > > > > >
> > > > > > So what you end up with is all the APPLICATION wide variables
> > > > > > are defined as set in OnApplicationStart().
> > > > > >
> > > > > > No need to copy them into the REQUEST scope
> > > > > >
> > > > > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Hi AJ,
> > > > > > >
> > > > > > > That's what I did in application.cfc (see attached file as
> > > > > > > requested by Andrew).
> > > > > > >
> > > > > > > On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > > > Hi George,
> > > > > > > >
> > > > > > > > I think you are after something more like this:
> > > > > > > >
> > > > > > > >
> > > > > > > >  > > > > > > > createObject("component",variables.componentPath &
> > > > > > > > ".components.surveyDAO").init(variables.dsn) />
> > > > > > > >  > > > > > > > CreateObject("component"," CFC.DataMgr").init("HR","MSSQL")
> > > > > > > > />
> > > > > > > > 
> > > > > > > >
> > > > > > > > 
> > > > > > > >  > > > > > > > required="true" />
> > > > > > > >
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > > > > If the URL.updateapp exists - it will call
> > > > > > > > onApplicationStart which will initialise your object for you.
> > > > > > > >
> > > > > > > > Then you can use Application.surveyDAO anywhere in you
> > > > > > > > application
> > > > > > > >
> > > > > > > > On 6/7/07, Andrew Scott < [EMAIL PROTECTED]> wrote:
> > > > > > > > >
> > > > > > > > >  Looks like Peter got to youJ
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > If you set the Object up in onApplicationStart, there is
> > > > > > > > > no need and I mean this!! No need to copy the
> > > > > > > > > Application.surveyDAO to the request scope.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > I would really like to know who is teaching people to do
> > > > > > > > > this, can you imagine 1000 users hitting the application and 
> > > > > > > > > how many extra
> > > > > > > > > ram is wasted by such a method.. Peter might like doing this 
> > > > > > > > > and wasting
> > > > > > > > > valuable resources, but it should not be a practice taken 
> > > > > > > > > upon.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > If you want to email me your application.cfc, I will
> > > > > > > > > modify it and get it to work for you.
> > > > > > > > >
> > > > > > > > >
> > > > > 

[cfaussie] Re: Application object

2007-06-06 Thread George Lu
Thanks Andrew and AJ. Now I understand - once an object is initialised
in OnApplicationStart
function then it's available in every page. If the object is changed or a
new object is created after app start then we need to
reinitialise/initialise it using something like
http://mysite/?updateapp=true.

On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
>
> any code inside the OnApplicationStart function will only run the first
> time the application is run. So if you put in a new CreateObject() you will
> need will need to do the ?updateapp=1
>
> If you change a CFC that has already been created and stored in the
> APPLICATION scope, you will also need to do updateapp=1 as the old version
> will still be there.
>
> On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> >
> > But I've been told if I change the object in cfc I have to init the
> > object again in myPage.cfm so the change'll happen. Is that true?
> >
> > On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > >
> > > no, because if the APPLICATION scope does not exist OnApplicationStart
> > > () will be fired
> > >
> > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Thanks AJ. But for the objects, do I need to do something like this
> > > > on myPage.cfm?
> > > >
> > > > 
> > > >  > > > intranet.hr.survey.components.surveyDAO").init("HR") />
> > > > 
> > > >
> > > > in the event the object is not initialised.
> > > >
> > > > On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > As per A.S. loose (delete/remove/cut/destroy) these lines in
> > > > > onRequestStart
> > > > >
> > > > > 
> > > > >  > > > > Application.surveyGateway />
> > > > > 
> > > > >
> > > > > move these to OnApplicationStart
> > > > > 
> > > > > 
> > > > > and change request to application for the dsn
> > > > > 
> > > > >
> > > > > Then in you code, reference
> > > > >Application.surveyDAO1
> > > > >Application.hrSurveyObj
> > > > >APPLICATION.dsn
> > > > >
> > > > > So what you end up with is all the APPLICATION wide variables are
> > > > > defined as set in OnApplicationStart().
> > > > >
> > > > > No need to copy them into the REQUEST scope
> > > > >
> > > > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Hi AJ,
> > > > > >
> > > > > > That's what I did in application.cfc (see attached file as
> > > > > > requested by Andrew).
> > > > > >
> > > > > > On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Hi George,
> > > > > > >
> > > > > > > I think you are after something more like this:
> > > > > > >
> > > > > > >
> > > > > > >  > > > > > > createObject("component",variables.componentPath &
> > > > > > > ".components.surveyDAO").init(variables.dsn) />
> > > > > > >  > > > > > > CreateObject("component"," CFC.DataMgr").init("HR","MSSQL") />
> > > > > > >
> > > > > > > 
> > > > > > >
> > > > > > > 
> > > > > > >  > > > > > > required="true" />
> > > > > > >
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > > > > If the URL.updateapp exists - it will call onApplicationStart
> > > > > > > which will initialise your object for you.
> > > > > > >
> > > > > > > Then you can use Application.surveyDAO anywhere in you
> > > > > > > application
> > > > > > >
> > > > > > > On 6/7/07, Andrew Scott < [EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > > >  Looks like Peter got to youJ
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > If you set the Object up in onApplicationStart, there is no
> > > > > > > > need and I mean this!! No need to copy the
> > > > > > > > Application.surveyDAO to the request scope.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > I would really like to know who is teaching people to do
> > > > > > > > this, can you imagine 1000 users hitting the application and 
> > > > > > > > how many extra
> > > > > > > > ram is wasted by such a method.. Peter might like doing this 
> > > > > > > > and wasting
> > > > > > > > valuable resources, but it should not be a practice taken upon.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > If you want to email me your application.cfc, I will modify
> > > > > > > > it and get it to work for you.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Andrew Scott
> > > > > > > > Senior Coldfusion Developer
> > > > > > > > Aegeon Pty. Ltd.
> > > > > > > > www.aegeon.com.au
> > > > > > > > Phone: +613  8676 4223
> > > > > > > > Mobile: 0404 998 273
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > *From:* cfaussie@googlegroups.com [mailto:
> > > > > > > > [EMAIL PROTECTED] *On Behalf Of *George Lu
> > > > > > > > *Sent:* Thursday, 7 June 2007 12:57 PM
> > > > > > > > *To:* cfaussie@googlegroups.com
> > > > > > >

[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
any code inside the OnApplicationStart function will only run the first time
the application is run. So if you put in a new CreateObject() you will need
will need to do the ?updateapp=1

If you change a CFC that has already been created and stored in the
APPLICATION scope, you will also need to do updateapp=1 as the old version
will still be there.

On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
>
> But I've been told if I change the object in cfc I have to init the object
> again in myPage.cfm so the change'll happen. Is that true?
>
> On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> >
> > no, because if the APPLICATION scope does not exist OnApplicationStart
> > () will be fired
> >
> > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > >
> > > Thanks AJ. But for the objects, do I need to do something like this on
> > > myPage.cfm?
> > >
> > > 
> > >  > > intranet.hr.survey.components.surveyDAO").init("HR") />
> > > 
> > >
> > > in the event the object is not initialised.
> > >
> > > On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > > >
> > > > As per A.S. loose (delete/remove/cut/destroy) these lines in
> > > > onRequestStart
> > > >
> > > > 
> > > > 
> > > > 
> > > >
> > > > move these to OnApplicationStart
> > > > 
> > > > 
> > > > and change request to application for the dsn
> > > > 
> > > >
> > > > Then in you code, reference
> > > >Application.surveyDAO1
> > > >Application.hrSurveyObj
> > > >APPLICATION.dsn
> > > >
> > > > So what you end up with is all the APPLICATION wide variables are
> > > > defined as set in OnApplicationStart().
> > > >
> > > > No need to copy them into the REQUEST scope
> > > >
> > > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hi AJ,
> > > > >
> > > > > That's what I did in application.cfc (see attached file as
> > > > > requested by Andrew).
> > > > >
> > > > > On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Hi George,
> > > > > >
> > > > > > I think you are after something more like this:
> > > > > >
> > > > > >
> > > > > >  > > > > > variables.componentPath & ".components.surveyDAO").init(
> > > > > > variables.dsn) />
> > > > > >  > > > > > CreateObject("component"," CFC.DataMgr").init("HR","MSSQL") />
> > > > > > 
> > > > > >
> > > > > > 
> > > > > >  > > > > > required="true" />
> > > > > >
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > > > > 
> > > > > > 
> > > > > >
> > > > > > If the URL.updateapp exists - it will call onApplicationStart
> > > > > > which will initialise your object for you.
> > > > > >
> > > > > > Then you can use Application.surveyDAO anywhere in you
> > > > > > application
> > > > > >
> > > > > > On 6/7/07, Andrew Scott < [EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > >  Looks like Peter got to youJ
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > If you set the Object up in onApplicationStart, there is no
> > > > > > > need and I mean this!! No need to copy the
> > > > > > > Application.surveyDAO to the request scope.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > I would really like to know who is teaching people to do this,
> > > > > > > can you imagine 1000 users hitting the application and how many 
> > > > > > > extra ram is
> > > > > > > wasted by such a method.. Peter might like doing this and wasting 
> > > > > > > valuable
> > > > > > > resources, but it should not be a practice taken upon.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > If you want to email me your application.cfc, I will modify it
> > > > > > > and get it to work for you.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Andrew Scott
> > > > > > > Senior Coldfusion Developer
> > > > > > > Aegeon Pty. Ltd.
> > > > > > > www.aegeon.com.au
> > > > > > > Phone: +613  8676 4223
> > > > > > > Mobile: 0404 998 273
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > *From:* cfaussie@googlegroups.com [mailto:
> > > > > > > [EMAIL PROTECTED] *On Behalf Of *George Lu
> > > > > > > *Sent:* Thursday, 7 June 2007 12:57 PM
> > > > > > > *To:* cfaussie@googlegroups.com
> > > > > > > *Subject:* [cfaussie] Re: Application object
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > No, I've tried Andrew's method:
> > > > > > >
> > > > > > >  
> > > > > > >  > > > > > > required="true" />
> > > > > > >
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > > > >  > > > > > > variables.componentPath />
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > > > > and the same error again.
> > > > > > >
> > > > > > > On 07/06/07, *George Lu* <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Dale,
> 

[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
George,

 

The answer is yes, but in your case it is no. The reason being is that if
you are using DataMgr.cfc and have made changes then yes, this has to
reinitialised for the changes to take effect. So in your case
http://mydomain/?updateapp=true when you have made changes will solve that
problem for you.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 2:34 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

But I've been told if I change the object in cfc I have to init the object
again in myPage.cfm so the change'll happen. Is that true?

On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:

no, because if the APPLICATION scope does not exist OnApplicationStart ()
will be fired

 

On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:

Thanks AJ. But for the objects, do I need to do something like this on
myPage.cfm?





in the event the object is not initialised.

 

On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:

As per A.S. loose (delete/remove/cut/destroy) these lines in onRequestStart





move these to OnApplicationStart 


and change request to application for the dsn


Then in you code, reference
   Application.surveyDAO1
   Application.hrSurveyObj 
   APPLICATION.dsn

So what you end up with is all the APPLICATION wide variables are defined as
set in OnApplicationStart().

No need to copy them into the REQUEST scope

 

On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:

Hi AJ,

That's what I did in application.cfc (see attached file as requested by
Andrew).

On 07/06/07, AJ Mercer < [EMAIL PROTECTED]  >
wrote:

Hi George,

I think you are after something more like this: 

   

 



 
   



 


 

If the URL.updateapp exists - it will call onApplicationStart which will
initialise your object for you.

Then you can use Application.surveyDAO anywhere in you application

 

On 6/7/07, Andrew Scott < 
[EMAIL PROTECTED]> wrote:

Looks like Peter got to youJ 

 

If you set the Object up in onApplicationStart, there is no need and I mean
this!! No need to copy the Application.surveyDAO to the request scope.

 

I would really like to know who is teaching people to do this, can you
imagine 1000 users hitting the application and how many extra ram is wasted
by such a method.. Peter might like doing this and wasting valuable
resources, but it should not be a practice taken upon.

 

If you want to email me your application.cfc, I will modify it and get it to
work for you.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:57 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

No, I've tried Andrew's method:

 
 




 






 

and the same error again.

On 07/06/07, George Lu <[EMAIL PROTECTED]> wrote:

Dale, 

I put the application scope on top of the page then it works. Maybe I should
do it as Andrew suggested. Thanks everyone.

 

On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:

Are you sure it got created.

 

Possibly added the OnApplicationStart code after the app was already
started.

 

Dump the Application scope and see of the surveyDAO exists in it.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:


Element SURVEYDAO is undefined in a Java object of type class
[Ljava.lang.String; referenced as



The object in application.cfc:





The code causing the error:


Please help!

George

 

 

 

 

 

 




-- 

If you are not living on the edge,
You are taking up too much space.











-- 
If you are not living on the edge,
You are taking up too much space.








-- 
If you are not living on the edge,
You are taking up too much space.





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie

[cfaussie] Re: Application object

2007-06-06 Thread George Lu
But I've been told if I change the object in cfc I have to init the object
again in myPage.cfm so the change'll happen. Is that true?

On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
>
> no, because if the APPLICATION scope does not exist OnApplicationStart ()
> will be fired
>
> On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> >
> > Thanks AJ. But for the objects, do I need to do something like this on
> > myPage.cfm?
> >
> > 
> >  > intranet.hr.survey.components.surveyDAO").init("HR") />
> > 
> >
> > in the event the object is not initialised.
> >
> > On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > >
> > > As per A.S. loose (delete/remove/cut/destroy) these lines in
> > > onRequestStart
> > >
> > > 
> > > 
> > > 
> > >
> > > move these to OnApplicationStart
> > > 
> > > 
> > > and change request to application for the dsn
> > > 
> > >
> > > Then in you code, reference
> > >Application.surveyDAO1
> > >Application.hrSurveyObj
> > >APPLICATION.dsn
> > >
> > > So what you end up with is all the APPLICATION wide variables are
> > > defined as set in OnApplicationStart().
> > >
> > > No need to copy them into the REQUEST scope
> > >
> > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi AJ,
> > > >
> > > > That's what I did in application.cfc (see attached file as requested
> > > > by Andrew).
> > > >
> > > > On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hi George,
> > > > >
> > > > > I think you are after something more like this:
> > > > >
> > > > >
> > > > >  > > > > variables.componentPath & ".components.surveyDAO").init(
> > > > > variables.dsn) />
> > > > >  > > > > CreateObject("component"," CFC.DataMgr").init("HR","MSSQL") />
> > > > > 
> > > > >
> > > > > 
> > > > >  > > > > required="true" />
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > > 
> > > > > 
> > > > >
> > > > > If the URL.updateapp exists - it will call onApplicationStart
> > > > > which will initialise your object for you.
> > > > >
> > > > > Then you can use Application.surveyDAO anywhere in you application
> > > > >
> > > > > On 6/7/07, Andrew Scott < [EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > >  Looks like Peter got to youJ
> > > > > >
> > > > > >
> > > > > >
> > > > > > If you set the Object up in onApplicationStart, there is no need
> > > > > > and I mean this!! No need to copy the Application.surveyDAO to
> > > > > > the request scope.
> > > > > >
> > > > > >
> > > > > >
> > > > > > I would really like to know who is teaching people to do this,
> > > > > > can you imagine 1000 users hitting the application and how many 
> > > > > > extra ram is
> > > > > > wasted by such a method.. Peter might like doing this and wasting 
> > > > > > valuable
> > > > > > resources, but it should not be a practice taken upon.
> > > > > >
> > > > > >
> > > > > >
> > > > > > If you want to email me your application.cfc, I will modify it
> > > > > > and get it to work for you.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Andrew Scott
> > > > > > Senior Coldfusion Developer
> > > > > > Aegeon Pty. Ltd.
> > > > > > www.aegeon.com.au
> > > > > > Phone: +613  8676 4223
> > > > > > Mobile: 0404 998 273
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > *From:* cfaussie@googlegroups.com [mailto:
> > > > > > [EMAIL PROTECTED] *On Behalf Of *George Lu
> > > > > > *Sent:* Thursday, 7 June 2007 12:57 PM
> > > > > > *To:* cfaussie@googlegroups.com
> > > > > > *Subject:* [cfaussie] Re: Application object
> > > > > >
> > > > > >
> > > > > >
> > > > > > No, I've tried Andrew's method:
> > > > > >
> > > > > >  
> > > > > >  > > > > > required="true" />
> > > > > >
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > > > >  > > > > > variables.componentPath />
> > > > > > 
> > > > > > 
> > > > > >
> > > > > > 
> > > > > > 
> > > > > >
> > > > > > and the same error again.
> > > > > >
> > > > > > On 07/06/07, *George Lu* <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Dale,
> > > > > >
> > > > > > I put the application scope on top of the page then it works.
> > > > > > Maybe I should do it as Andrew suggested. Thanks everyone.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 07/06/07, *Dale Fraser *<[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Are you sure it got created.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Possibly added the OnApplicationStart code after the app was
> > > > > > already started.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Dump the Application scope and see of the surveyDAO exists in
> > > > > > it.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Regards
> > > > > >
> > > > > > Dale Fraser
> > > > > >
> > > > > >
> > > > > >
> > > > > > htt

[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
no, because if the APPLICATION scope does not exist OnApplicationStart ()
will be fired

On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
>
> Thanks AJ. But for the objects, do I need to do something like this on
> myPage.cfm?
>
> 
>  intranet.hr.survey.components.surveyDAO").init("HR") />
> 
>
> in the event the object is not initialised.
>
> On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> >
> > As per A.S. loose (delete/remove/cut/destroy) these lines in
> > onRequestStart
> >
> > 
> > 
> > 
> >
> > move these to OnApplicationStart
> > 
> > 
> > and change request to application for the dsn
> > 
> >
> > Then in you code, reference
> >Application.surveyDAO1
> >Application.hrSurveyObj
> >APPLICATION.dsn
> >
> > So what you end up with is all the APPLICATION wide variables are
> > defined as set in OnApplicationStart().
> >
> > No need to copy them into the REQUEST scope
> >
> > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi AJ,
> > >
> > > That's what I did in application.cfc (see attached file as requested
> > > by Andrew).
> > >
> > > On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi George,
> > > >
> > > > I think you are after something more like this:
> > > >
> > > >
> > > >  > > > variables.componentPath & ".components.surveyDAO").init(
> > > > variables.dsn) />
> > > >  > > > CFC.DataMgr").init("HR","MSSQL") />
> > > > 
> > > >
> > > > 
> > > >  > > > />
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > > > 
> > > >
> > > > If the URL.updateapp exists - it will call onApplicationStart which
> > > > will initialise your object for you.
> > > >
> > > > Then you can use Application.surveyDAO anywhere in you application
> > > >
> > > > On 6/7/07, Andrew Scott < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > >  Looks like Peter got to youJ
> > > > >
> > > > >
> > > > >
> > > > > If you set the Object up in onApplicationStart, there is no need
> > > > > and I mean this!! No need to copy the Application.surveyDAO to the
> > > > > request scope.
> > > > >
> > > > >
> > > > >
> > > > > I would really like to know who is teaching people to do this, can
> > > > > you imagine 1000 users hitting the application and how many extra ram 
> > > > > is
> > > > > wasted by such a method.. Peter might like doing this and wasting 
> > > > > valuable
> > > > > resources, but it should not be a practice taken upon.
> > > > >
> > > > >
> > > > >
> > > > > If you want to email me your application.cfc, I will modify it and
> > > > > get it to work for you.
> > > > >
> > > > >
> > > > >
> > > > > Andrew Scott
> > > > > Senior Coldfusion Developer
> > > > > Aegeon Pty. Ltd.
> > > > > www.aegeon.com.au
> > > > > Phone: +613  8676 4223
> > > > > Mobile: 0404 998 273
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > *From:* cfaussie@googlegroups.com [mailto:
> > > > > [EMAIL PROTECTED] *On Behalf Of *George Lu
> > > > > *Sent:* Thursday, 7 June 2007 12:57 PM
> > > > > *To:* cfaussie@googlegroups.com
> > > > > *Subject:* [cfaussie] Re: Application object
> > > > >
> > > > >
> > > > >
> > > > > No, I've tried Andrew's method:
> > > > >
> > > > >  
> > > > >  > > > > required="true" />
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > > 
> > > > > 
> > > > >
> > > > > and the same error again.
> > > > >
> > > > > On 07/06/07, *George Lu* <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Dale,
> > > > >
> > > > > I put the application scope on top of the page then it works.
> > > > > Maybe I should do it as Andrew suggested. Thanks everyone.
> > > > >
> > > > >
> > > > >
> > > > > On 07/06/07, *Dale Fraser *<[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Are you sure it got created.
> > > > >
> > > > >
> > > > >
> > > > > Possibly added the OnApplicationStart code after the app was
> > > > > already started.
> > > > >
> > > > >
> > > > >
> > > > > Dump the Application scope and see of the surveyDAO exists in it.
> > > > >
> > > > >
> > > > >
> > > > > Regards
> > > > >
> > > > > Dale Fraser
> > > > >
> > > > >
> > > > >
> > > > > http://dalefraser.blogspot.com
> > > > >
> > > > >
> > > > >
> > > > > *From:* cfaussie@googlegroups.com [mailto:
> > > > > [EMAIL PROTECTED] *On Behalf Of *George Lu
> > > > > *Sent:* Thursday, 7 June 2007 12:32 PM
> > > > > *To:* CFAussie Mailing List
> > > > > *Subject:* [cfaussie] Application object
> > > > >
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > I create an object in Application.cfc and put it in the
> > > > > application scope. When I use it in other pages it comes up this 
> > > > > error:
> > > > > Element SURVEYDAO is undefined in a Java object of type class [
> > > > > Ljava.lang.String; referenc

[cfaussie] Re: Application object

2007-06-06 Thread George Lu
Thanks AJ. But for the objects, do I need to do something like this on
myPage.cfm?





in the event the object is not initialised.

On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
>
> As per A.S. loose (delete/remove/cut/destroy) these lines in
> onRequestStart
>
> 
> 
> 
>
> move these to OnApplicationStart
> 
> 
> and change request to application for the dsn
> 
>
> Then in you code, reference
>Application.surveyDAO1
>Application.hrSurveyObj
>APPLICATION.dsn
>
> So what you end up with is all the APPLICATION wide variables are defined
> as set in OnApplicationStart().
>
> No need to copy them into the REQUEST scope
>
> On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> >
> > Hi AJ,
> >
> > That's what I did in application.cfc (see attached file as requested by
> > Andrew).
> >
> > On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> > >
> > > Hi George,
> > >
> > > I think you are after something more like this:
> > >
> > >
> > >  > > variables.componentPath & ".components.surveyDAO").init(variables.dsn)
> > > />
> > >  > > CFC.DataMgr").init("HR","MSSQL") />
> > > 
> > >
> > > 
> > > 
> > >
> > >
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > >
> > > If the URL.updateapp exists - it will call onApplicationStart which
> > > will initialise your object for you.
> > >
> > > Then you can use Application.surveyDAO anywhere in you application
> > >
> > > On 6/7/07, Andrew Scott < [EMAIL PROTECTED]> wrote:
> > > >
> > > >  Looks like Peter got to youJ
> > > >
> > > >
> > > >
> > > > If you set the Object up in onApplicationStart, there is no need and
> > > > I mean this!! No need to copy the Application.surveyDAO to the
> > > > request scope.
> > > >
> > > >
> > > >
> > > > I would really like to know who is teaching people to do this, can
> > > > you imagine 1000 users hitting the application and how many extra ram is
> > > > wasted by such a method.. Peter might like doing this and wasting 
> > > > valuable
> > > > resources, but it should not be a practice taken upon.
> > > >
> > > >
> > > >
> > > > If you want to email me your application.cfc, I will modify it and
> > > > get it to work for you.
> > > >
> > > >
> > > >
> > > > Andrew Scott
> > > > Senior Coldfusion Developer
> > > > Aegeon Pty. Ltd.
> > > > www.aegeon.com.au
> > > > Phone: +613  8676 4223
> > > > Mobile: 0404 998 273
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED]
> > > > *On Behalf Of *George Lu
> > > > *Sent:* Thursday, 7 June 2007 12:57 PM
> > > > *To:* cfaussie@googlegroups.com
> > > > *Subject:* [cfaussie] Re: Application object
> > > >
> > > >
> > > >
> > > > No, I've tried Andrew's method:
> > > >
> > > >  
> > > >  > > > />
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > > > 
> > > >
> > > > and the same error again.
> > > >
> > > > On 07/06/07, *George Lu* <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Dale,
> > > >
> > > > I put the application scope on top of the page then it works. Maybe
> > > > I should do it as Andrew suggested. Thanks everyone.
> > > >
> > > >
> > > >
> > > > On 07/06/07, *Dale Fraser *<[EMAIL PROTECTED]> wrote:
> > > >
> > > > Are you sure it got created.
> > > >
> > > >
> > > >
> > > > Possibly added the OnApplicationStart code after the app was already
> > > > started.
> > > >
> > > >
> > > >
> > > > Dump the Application scope and see of the surveyDAO exists in it.
> > > >
> > > >
> > > >
> > > > Regards
> > > >
> > > > Dale Fraser
> > > >
> > > >
> > > >
> > > > http://dalefraser.blogspot.com
> > > >
> > > >
> > > >
> > > > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED]
> > > > *On Behalf Of *George Lu
> > > > *Sent:* Thursday, 7 June 2007 12:32 PM
> > > > *To:* CFAussie Mailing List
> > > > *Subject:* [cfaussie] Application object
> > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I create an object in Application.cfc and put it in the application
> > > > scope. When I use it in other pages it comes up this error:
> > > > Element SURVEYDAO is undefined in a Java object of type class [
> > > > Ljava.lang.String; referenced as
> > > >
> > > >
> > > > The object in application.cfc:
> > > > 
> > > >  > > > variables.componentPath & ".components.surveyDAO").init(
> > > > variables.dsn) />
> > > >  > > > CFC.DataMgr").init("HR","MSSQL") />
> > > > 
> > > >
> > > > The code causing the error:
> > > > 
> > > >
> > > > Please help!
> > > >
> > > > George
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > If you are not living on the edge,
> > > You are taking up too much space.
> > >
> > >
> >
> >
> >
> >
>
>
> --
> If you a

[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
As per A.S. loose (delete/remove/cut/destroy) these lines in onRequestStart





move these to OnApplicationStart


and change request to application for the dsn


Then in you code, reference
   Application.surveyDAO1
   Application.hrSurveyObj
   APPLICATION.dsn

So what you end up with is all the APPLICATION wide variables are defined as
set in OnApplicationStart().

No need to copy them into the REQUEST scope

On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
>
> Hi AJ,
>
> That's what I did in application.cfc (see attached file as requested by
> Andrew).
>
> On 07/06/07, AJ Mercer < [EMAIL PROTECTED]> wrote:
> >
> > Hi George,
> >
> > I think you are after something more like this:
> >
> >
> >  > variables.componentPath & ".components.surveyDAO").init(variables.dsn)
> > />
> >  > CFC.DataMgr").init("HR","MSSQL") />
> > 
> >
> > 
> > 
> >
> > 
> > 
> > 
> > 
> >
> > 
> > 
> >
> > If the URL.updateapp exists - it will call onApplicationStart which will
> > initialise your object for you.
> >
> > Then you can use Application.surveyDAO anywhere in you application
> >
> > On 6/7/07, Andrew Scott < [EMAIL PROTECTED]> wrote:
> > >
> > >  Looks like Peter got to youJ
> > >
> > >
> > >
> > > If you set the Object up in onApplicationStart, there is no need and I
> > > mean this!! No need to copy the Application.surveyDAO to the request
> > > scope.
> > >
> > >
> > >
> > > I would really like to know who is teaching people to do this, can you
> > > imagine 1000 users hitting the application and how many extra ram is 
> > > wasted
> > > by such a method.. Peter might like doing this and wasting valuable
> > > resources, but it should not be a practice taken upon.
> > >
> > >
> > >
> > > If you want to email me your application.cfc, I will modify it and get
> > > it to work for you.
> > >
> > >
> > >
> > > Andrew Scott
> > > Senior Coldfusion Developer
> > > Aegeon Pty. Ltd.
> > > www.aegeon.com.au
> > > Phone: +613  8676 4223
> > > Mobile: 0404 998 273
> > >
> > >
> > >
> > >
> > >
> > > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> > > Behalf Of *George Lu
> > > *Sent:* Thursday, 7 June 2007 12:57 PM
> > > *To:* cfaussie@googlegroups.com
> > > *Subject:* [cfaussie] Re: Application object
> > >
> > >
> > >
> > > No, I've tried Andrew's method:
> > >
> > >  
> > > 
> > >
> > >
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > >
> > > and the same error again.
> > >
> > > On 07/06/07, *George Lu* <[EMAIL PROTECTED]> wrote:
> > >
> > > Dale,
> > >
> > > I put the application scope on top of the page then it works. Maybe I
> > > should do it as Andrew suggested. Thanks everyone.
> > >
> > >
> > >
> > > On 07/06/07, *Dale Fraser *<[EMAIL PROTECTED]> wrote:
> > >
> > > Are you sure it got created.
> > >
> > >
> > >
> > > Possibly added the OnApplicationStart code after the app was already
> > > started.
> > >
> > >
> > >
> > > Dump the Application scope and see of the surveyDAO exists in it.
> > >
> > >
> > >
> > > Regards
> > >
> > > Dale Fraser
> > >
> > >
> > >
> > > http://dalefraser.blogspot.com
> > >
> > >
> > >
> > > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> > > Behalf Of *George Lu
> > > *Sent:* Thursday, 7 June 2007 12:32 PM
> > > *To:* CFAussie Mailing List
> > > *Subject:* [cfaussie] Application object
> > >
> > >
> > >
> > > Hi,
> > >
> > > I create an object in Application.cfc and put it in the application
> > > scope. When I use it in other pages it comes up this error:
> > > Element SURVEYDAO is undefined in a Java object of type class [
> > > Ljava.lang.String; referenced as
> > >
> > >
> > > The object in application.cfc:
> > > 
> > >  > > variables.componentPath & ".components.surveyDAO").init(variables.dsn)
> > > />
> > >  > > CFC.DataMgr").init("HR","MSSQL") />
> > > 
> > >
> > > The code causing the error:
> > > 
> > >
> > > Please help!
> > >
> > > George
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > --
> > If you are not living on the edge,
> > You are taking up too much space.
> >
> >
>
> >
>
>


-- 
If you are not living on the edge,
You are taking up too much space.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
Hi AJ,

That's what I did in application.cfc (see attached file as requested by
Andrew).

On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
>
> Hi George,
>
> I think you are after something more like this:
>
>
>  variables.componentPath & ".components.surveyDAO").init(variables.dsn) />
>  CFC.DataMgr").init("HR","MSSQL") />
> 
>
> 
> 
>
> 
> 
> 
> 
>
> 
> 
>
> If the URL.updateapp exists - it will call onApplicationStart which will
> initialise your object for you.
>
> Then you can use Application.surveyDAO anywhere in you application
>
> On 6/7/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
> >
> >  Looks like Peter got to youJ
> >
> >
> >
> > If you set the Object up in onApplicationStart, there is no need and I
> > mean this!! No need to copy the Application.surveyDAO to the request
> > scope.
> >
> >
> >
> > I would really like to know who is teaching people to do this, can you
> > imagine 1000 users hitting the application and how many extra ram is wasted
> > by such a method.. Peter might like doing this and wasting valuable
> > resources, but it should not be a practice taken upon.
> >
> >
> >
> > If you want to email me your application.cfc, I will modify it and get
> > it to work for you.
> >
> >
> >
> > Andrew Scott
> > Senior Coldfusion Developer
> > Aegeon Pty. Ltd.
> > www.aegeon.com.au
> > Phone: +613  8676 4223
> > Mobile: 0404 998 273
> >
> >
> >
> >
> >
> > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> > Behalf Of *George Lu
> > *Sent:* Thursday, 7 June 2007 12:57 PM
> > *To:* cfaussie@googlegroups.com
> > *Subject:* [cfaussie] Re: Application object
> >
> >
> >
> > No, I've tried Andrew's method:
> >
> >  
> > 
> >
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> >
> > 
> > 
> >
> > and the same error again.
> >
> > On 07/06/07, *George Lu* <[EMAIL PROTECTED]> wrote:
> >
> > Dale,
> >
> > I put the application scope on top of the page then it works. Maybe I
> > should do it as Andrew suggested. Thanks everyone.
> >
> >
> >
> > On 07/06/07, *Dale Fraser *<[EMAIL PROTECTED]> wrote:
> >
> > Are you sure it got created.
> >
> >
> >
> > Possibly added the OnApplicationStart code after the app was already
> > started.
> >
> >
> >
> > Dump the Application scope and see of the surveyDAO exists in it.
> >
> >
> >
> > Regards
> >
> > Dale Fraser
> >
> >
> >
> > http://dalefraser.blogspot.com
> >
> >
> >
> > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> > Behalf Of *George Lu
> > *Sent:* Thursday, 7 June 2007 12:32 PM
> > *To:* CFAussie Mailing List
> > *Subject:* [cfaussie] Application object
> >
> >
> >
> > Hi,
> >
> > I create an object in Application.cfc and put it in the application
> > scope. When I use it in other pages it comes up this error:
> > Element SURVEYDAO is undefined in a Java object of type class [
> > Ljava.lang.String; referenced as
> >
> >
> > The object in application.cfc:
> > 
> >  > variables.componentPath & ".components.surveyDAO").init(variables.dsn)
> > />
> >  > CFC.DataMgr").init("HR","MSSQL") />
> > 
> >
> > The code causing the error:
> > 
> >
> > Please help!
> >
> > George
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> If you are not living on the edge,
> You are taking up too much space.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



Application.cfc
Description: application/cfc


[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
Hi George,

I think you are after something more like this:

   















If the URL.updateapp exists - it will call onApplicationStart which will
initialise your object for you.

Then you can use Application.surveyDAO anywhere in you application

On 6/7/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
>
>  Looks like Peter got to youJ
>
>
>
> If you set the Object up in onApplicationStart, there is no need and I
> mean this!! No need to copy the Application.surveyDAO to the request
> scope.
>
>
>
> I would really like to know who is teaching people to do this, can you
> imagine 1000 users hitting the application and how many extra ram is wasted
> by such a method.. Peter might like doing this and wasting valuable
> resources, but it should not be a practice taken upon.
>
>
>
> If you want to email me your application.cfc, I will modify it and get it
> to work for you.
>
>
>
> Andrew Scott
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au
> Phone: +613  8676 4223
> Mobile: 0404 998 273
>
>
>
>
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *George Lu
> *Sent:* Thursday, 7 June 2007 12:57 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Re: Application object
>
>
>
> No, I've tried Andrew's method:
>
>  
> 
>
> 
> 
> 
> 
>
> 
> 
> 
>
> 
> 
>
> and the same error again.
>
> On 07/06/07, *George Lu* <[EMAIL PROTECTED]> wrote:
>
> Dale,
>
> I put the application scope on top of the page then it works. Maybe I
> should do it as Andrew suggested. Thanks everyone.
>
>
>
> On 07/06/07, *Dale Fraser *<[EMAIL PROTECTED]> wrote:
>
> Are you sure it got created.
>
>
>
> Possibly added the OnApplicationStart code after the app was already
> started.
>
>
>
> Dump the Application scope and see of the surveyDAO exists in it.
>
>
>
> Regards
>
> Dale Fraser
>
>
>
> http://dalefraser.blogspot.com
>
>
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *George Lu
> *Sent:* Thursday, 7 June 2007 12:32 PM
> *To:* CFAussie Mailing List
> *Subject:* [cfaussie] Application object
>
>
>
> Hi,
>
> I create an object in Application.cfc and put it in the application scope.
> When I use it in other pages it comes up this error:
> Element SURVEYDAO is undefined in a Java object of type class [
> Ljava.lang.String; referenced as
>
>
> The object in application.cfc:
> 
>  variables.componentPath & ".components.surveyDAO").init(variables.dsn) />
>  CFC.DataMgr").init("HR","MSSQL") />
> 
>
> The code causing the error:
> 
>
> Please help!
>
> George
>
>
>
>
>
>
>
>
>
>
> >
>


-- 
If you are not living on the edge,
You are taking up too much space.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
As Dale said, this can have undesired results if used in the wrong
situation. However in my case, and not everyone is the same in this regard.
But I only use that method on my development server, and prefer to have a
temp file that is deleted when it is executed to restart the application
when changes have been made to the Application.cfc which is very rare for my
current clients work.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Thursday, 7 June 2007 1:01 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

Yes,

 

Andrew's method of restarting the application is a good one. Beats
restarting CF.

 

Mind you be careful as to what url you need to pass the application to cause
a restart, obviously if this got in the wrong hands.

 

You can have a totally separate page if you wish, that takes some type of
password.

 

http://www.site.com/appRestart.cfm

 

This could ask for a password and restart the app by calling the Application
methods Andrew used.

 

This way the method of restarting your app doesn't end up in browser caches
etc, at least not the password bit.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:51 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

Dale,

I put the application scope on top of the page then it works. Maybe I should
do it as Andrew suggested. Thanks everyone.

On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:

Are you sure it got created.

 

Possibly added the OnApplicationStart code after the app was already
started.

 

Dump the Application scope and see of the surveyDAO exists in it.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:


Element SURVEYDAO is undefined in a Java object of type class
[Ljava.lang.String; referenced as



The object in application.cfc:





The code causing the error:


Please help!

George

 

 

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
Looks like Peter got to youJ

 

If you set the Object up in onApplicationStart, there is no need and I mean
this!! No need to copy the Application.surveyDAO to the request scope.

 

I would really like to know who is teaching people to do this, can you
imagine 1000 users hitting the application and how many extra ram is wasted
by such a method.. Peter might like doing this and wasting valuable
resources, but it should not be a practice taken upon.

 

If you want to email me your application.cfc, I will modify it and get it to
work for you.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:57 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

No, I've tried Andrew's method:

 
 




 






 

and the same error again.

On 07/06/07, George Lu <[EMAIL PROTECTED]> wrote:

Dale, 

I put the application scope on top of the page then it works. Maybe I should
do it as Andrew suggested. Thanks everyone.

 

On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:

Are you sure it got created.

 

Possibly added the OnApplicationStart code after the app was already
started.

 

Dump the Application scope and see of the surveyDAO exists in it.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:


Element SURVEYDAO is undefined in a Java object of type class
[Ljava.lang.String; referenced as



The object in application.cfc:





The code causing the error:


Please help!

George



 

 

 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
Yes, I did (myPage.cfm?updateapp=1). The page shows up then it stop work
when I pass myPage.cfm?userID=15.

On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
>
>  Did you pass the url
>
>
>
> http://site.com/pageName.cfm?updateapp=true
>
>
>
> Regards
>
> Dale Fraser
>
>
>
> http://dalefraser.blogspot.com
>
>
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *George Lu
> *Sent:* Thursday, 7 June 2007 12:57 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Re: Application object
>
>
>
> No, I've tried Andrew's method:
>
>  
> 
>
> 
> 
> 
> 
>
> 
> 
> 
>
> 
> 
>
> and the same error again.
>
> On 07/06/07, *George Lu* <[EMAIL PROTECTED]> wrote:
>
> Dale,
>
> I put the application scope on top of the page then it works. Maybe I
> should do it as Andrew suggested. Thanks everyone.
>
>
>
> On 07/06/07, *Dale Fraser *<[EMAIL PROTECTED]> wrote:
>
> Are you sure it got created.
>
>
>
> Possibly added the OnApplicationStart code after the app was already
> started.
>
>
>
> Dump the Application scope and see of the surveyDAO exists in it.
>
>
>
> Regards
>
> Dale Fraser
>
>
>
> http://dalefraser.blogspot.com
>
>
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *George Lu
> *Sent:* Thursday, 7 June 2007 12:32 PM
> *To:* CFAussie Mailing List
> *Subject:* [cfaussie] Application object
>
>
>
> Hi,
>
> I create an object in Application.cfc and put it in the application scope.
> When I use it in other pages it comes up this error:
> Element SURVEYDAO is undefined in a Java object of type class [
> Ljava.lang.String; referenced as
>
>
> The object in application.cfc:
> 
>  variables.componentPath & ".components.surveyDAO").init(variables.dsn) />
>  CFC.DataMgr").init("HR","MSSQL") />
> 
>
> The code causing the error:
> 
>
> Please help!
>
> George
>
>
>
>
>
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Dale Fraser
Did you pass the url

 

http://site.com/pageName.cfm?updateapp=true

 

Regards

Dale Fraser

 

  http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:57 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

No, I've tried Andrew's method:

 
 




 






 

and the same error again.

On 07/06/07, George Lu <[EMAIL PROTECTED]> wrote:

Dale, 

I put the application scope on top of the page then it works. Maybe I should
do it as Andrew suggested. Thanks everyone.

 

On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:

Are you sure it got created.

 

Possibly added the OnApplicationStart code after the app was already
started.

 

Dump the Application scope and see of the surveyDAO exists in it.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:


Element SURVEYDAO is undefined in a Java object of type class
[Ljava.lang.String; referenced as



The object in application.cfc:





The code causing the error:


Please help!

George



 

 

 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Dale Fraser
Yes,

 

Andrew's method of restarting the application is a good one. Beats
restarting CF.

 

Mind you be careful as to what url you need to pass the application to cause
a restart, obviously if this got in the wrong hands.

 

You can have a totally separate page if you wish, that takes some type of
password.

 

http://www.site.com/appRestart.cfm

 

This could ask for a password and restart the app by calling the Application
methods Andrew used.

 

This way the method of restarting your app doesn't end up in browser caches
etc, at least not the password bit.

 

Regards

Dale Fraser

 

  http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:51 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

Dale,

I put the application scope on top of the page then it works. Maybe I should
do it as Andrew suggested. Thanks everyone.

On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:

Are you sure it got created.

 

Possibly added the OnApplicationStart code after the app was already
started.

 

Dump the Application scope and see of the surveyDAO exists in it.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:


Element SURVEYDAO is undefined in a Java object of type class
[Ljava.lang.String; referenced as



The object in application.cfc:





The code causing the error:


Please help!

George



 

 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Duncan

I think its because you have variables.componentPath in the string to
go find it. On application start this wont exist.

Personally I would set this up as an application variable, then after
that set up the object.

On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> No, I've tried Andrew's method:
>
>  
> 
>
> 
> 
> 
> 
>
> 
> 
> 
>
>  
> 
>
> and the same error again.
>
>
> On 07/06/07, George Lu <[EMAIL PROTECTED]> wrote:
> > Dale,
> >
> > I put the application scope on top of the page then it works. Maybe I
> should do it as Andrew suggested. Thanks everyone.
> >
> >
> >
> > On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > >
> > > Are you sure it got created.
> > >
> > >
> > >
> > > Possibly added the OnApplicationStart code after the app was already
> started.
> > >
> > >
> > >
> > > Dump the Application scope and see of the surveyDAO exists in it.
> > >
> > >
> > >
> > > Regards
> > >
> > > Dale Fraser
> > >
> > >
> > >
> > > http://dalefraser.blogspot.com
> > >
> > >
> > >
> > >
> > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of George Lu
> > > Sent: Thursday, 7 June 2007 12:32 PM
> > > To: CFAussie Mailing List
> > > Subject: [cfaussie] Application object
> > >
> > >
> > >
> > >
> > > Hi,
> > >
> > > I create an object in Application.cfc and put it in the application
> scope. When I use it in other pages it comes up this error:
> > >
> > >
> > > Element SURVEYDAO is undefined in a Java object of type class
> [Ljava.lang.String; referenced as
> > >
> > >
> > > The object in application.cfc:
> > > 
> > >  createObject("component",variables.componentPath &
> ".components.surveyDAO").init(variables.dsn) />
> > >  CFC.DataMgr").init("HR","MSSQL") />
> > > 
> > >
> > > The code causing the error:
> > > 
> > >
> > > Please help!
> > >
> > > George
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
>  >
>


-- 
Duncan I Loxton
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
No, I've tried Andrew's method:

 














and the same error again.

On 07/06/07, George Lu <[EMAIL PROTECTED]> wrote:
>
> Dale,
>
> I put the application scope on top of the page then it works. Maybe I
> should do it as Andrew suggested. Thanks everyone.
>
> On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
> >
> >  Are you sure it got created.
> >
> >
> >
> > Possibly added the OnApplicationStart code after the app was already
> > started.
> >
> >
> >
> > Dump the Application scope and see of the surveyDAO exists in it.
> >
> >
> >
> > Regards
> >
> > Dale Fraser
> >
> >
> >
> > http://dalefraser.blogspot.com
> >
> >
> >
> > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> > Behalf Of *George Lu
> > *Sent:* Thursday, 7 June 2007 12:32 PM
> > *To:* CFAussie Mailing List
> > *Subject:* [cfaussie] Application object
> >
> >
> >
> > Hi,
> >
> > I create an object in Application.cfc and put it in the application
> > scope. When I use it in other pages it comes up this error:
> >
> >  Element SURVEYDAO is undefined in a Java object of type class [
> > Ljava.lang.String; referenced as
> >
> >
> > The object in application.cfc:
> > 
> >  > variables.componentPath & ".components.surveyDAO").init(variables.dsn)
> > />
> >  > CFC.DataMgr").init("HR","MSSQL") />
> > 
> >
> > The code causing the error:
> > 
> >
> > Please help!
> >
> > George
> >
> >
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
Dale,

I put the application scope on top of the page then it works. Maybe I should
do it as Andrew suggested. Thanks everyone.

On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
>
>  Are you sure it got created.
>
>
>
> Possibly added the OnApplicationStart code after the app was already
> started.
>
>
>
> Dump the Application scope and see of the surveyDAO exists in it.
>
>
>
> Regards
>
> Dale Fraser
>
>
>
> http://dalefraser.blogspot.com
>
>
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *George Lu
> *Sent:* Thursday, 7 June 2007 12:32 PM
> *To:* CFAussie Mailing List
> *Subject:* [cfaussie] Application object
>
>
>
> Hi,
>
> I create an object in Application.cfc and put it in the application scope.
> When I use it in other pages it comes up this error:
>
>  Element SURVEYDAO is undefined in a Java object of type class [
> Ljava.lang.String; referenced as
>
>
> The object in application.cfc:
> 
>  variables.componentPath & ".components.surveyDAO").init(variables.dsn) />
>  CFC.DataMgr").init("HR","MSSQL") />
> 
>
> The code causing the error:
> 
>
> Please help!
>
> George
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
Yes. So I have to put the object in onRequestStart or top of the page to
init?

On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
>
> had the application already been run before you added the create object?
> If so, you will need to restart the application (or bounce the CF service)
> so the OnApplicationStart function gets executed
>
> On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I create an object in Application.cfc and put it in the application
> > scope. When I use it in other pages it comes up this error:
> >  Element SURVEYDAO is undefined in a Java object of type class [
> > Ljava.lang.String; referenced as
> > The object in application.cfc:
> > 
> >  > variables.componentPath & ".components.surveyDAO").init(variables.dsn)
> > />
> >  > CFC.DataMgr").init("HR","MSSQL") />
> > 
> >
> > The code causing the error:
> > 
> >
> > Please help!
> >
> > George
> >
> >
> >
> >
>
>
> --
> If you are not living on the edge,
> You are taking up too much space.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Dale Fraser
Are you sure it got created.

 

Possibly added the OnApplicationStart code after the app was already
started.

 

Dump the Application scope and see of the surveyDAO exists in it.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:




Element SURVEYDAO is undefined in a Java object of type class
[Ljava.lang.String; referenced as



The object in application.cfc:





The code causing the error:


Please help!

George




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
had the application already been run before you added the create object?
If so, you will need to restart the application (or bounce the CF service)
so the OnApplicationStart function gets executed

On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I create an object in Application.cfc and put it in the application scope.
> When I use it in other pages it comes up this error:
>  Element SURVEYDAO is undefined in a Java object of type class [
> Ljava.lang.String; referenced as
> The object in application.cfc:
> 
>  variables.componentPath & ".components.surveyDAO").init(variables.dsn) />
>  CFC.DataMgr").init("HR","MSSQL") />
> 
>
> The code causing the error:
> 
>
> Please help!
>
> George
>
>
> >
>


-- 
If you are not living on the edge,
You are taking up too much space.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
onApplication will only start / excute when there is no application named
with this.name.

 

You may need to put a ?uppdateapp=1 in your url to reset the application in
onRequestStart.

 



  







Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
  www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:




Element SURVEYDAO is undefined in a Java object of type class
[Ljava.lang.String; referenced as



The object in application.cfc:





The code causing the error:


Please help!

George




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Application object

2007-06-06 Thread George Lu
Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:
Element SURVEYDAO is undefined in a Java object of type class [
Ljava.lang.String; referenced as
The object in application.cfc:





The code causing the error:


Please help!

George

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] OT: Root relative paths and Iframe source

2007-06-06 Thread Scott Thornton

It wasn't me but a colleague who did it.

I am in the process of cleaning up stuff like this.

>>> "Taco Fleur" <[EMAIL PROTECTED]> 06/06/2007 4:56 pm >>>
I don't have an answer for you because I don't understand the problem, but I
am wondering why you put the base_url in the session scope and not the
application scope (I might be missing something here).




On 6/6/07, Scott Thornton <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I have some code which has always bugged me.
>
> 
> 
>name="SrchFrame"
>style="width:600px; height:500px; border: medium;"
>
> src="#session.base_url#SBSR02.cfm?DrType=initialise&DR=qwerty&Unique=#Trim(TimeFormat(Now(),'mmss'))#">
> 
>
> Its the #session.base_url# which bugs me. It makes pointing to our live
> database from my local server hard because the session.base_url will
> contain (from the live database) the live URL. http://myapp/ The search
> frame will not work in this instance. ( I guess it because 1. Its a
> different server 2. Not logged on etc )
>
> I thought I could perhaps use root relative paths eg /sbsr02.cfm.
>
> The error I then encounter is sbsr02.cfm can't be found because the server
> is looking for the file under c:\inetpub\wwwroot\ rather than the
> applications directory structure (say d:\websites\myapp\ ). I had debugging
> turned on and saw it looking for the file under c:\.
>
> The website http://127.0.0.1/myapp/ is a virtual directory running on IIS.
>
> I would have thought it would look for the file under
> d:\websites\myapp\sbsr02.cfm 
>
> (it was taco's post that got be wondering about this again).
>
> Any Advice?
>
>
>
>
> >
>


-- 
*** { . } { . } 
http://www.clickfind.com.au 
The new Australian search engine for businesses, products and services




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: CFAussie Community Head Count

2007-06-06 Thread MrBuzzy

You wish Peter!

That's 3 pings gone wayward now, nice one Barrie ;)

On 6/5/07, Peter Tilbrook <[EMAIL PROTECTED]> wrote:
>
> Yeah but Buzzy is on drugs and in Europe so does not count!
>
> On 05/06/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > ping ping ping ping
> >
> >

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: SOT: A bargain LCD screen

2007-06-06 Thread phaddon

On Wed, Jun 06, 2007 at 04:58:54PM +1000, Peter Tilbrook wrote:

> Ordered yesterday (before 12pm) and delivered today (also before 12pm).
> 
> A 22" Acer wide screen LCD monitor for only $429.00. Must be a mistake
> but I got mine right in front of me. Also grabbed a 320Gb Iomega
> external USB HDD. $429 for LCD and I have seen similar (same brand)

Sites like www.ausprices.com and www.shopbot.com.au can turn up 
prices lower than that every day.

Wouldn't this be better suited to the watercooler forum?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get root of the application

2007-06-06 Thread Taco Fleur
David, don't worry, it works for me.

On 6/6/07, David Harris <[EMAIL PROTECTED]> wrote:
>
>
> So from what you have there, the line of code in the included file:
> request.applicationRoot =
> getDirectoryFromPath( getCurrentTemplatePath() );
>
> is the one to get you the root of the application?
>
> I would expect:
> expandPath("/")
>
> to give you that too, no matter where in the application you run it,
> from a .cfm or a .cfc, 1 folder deep or 10 folders deep
>
> I have only tested this on my dev machine, and it returns "C:\Inetpub
> \wwwroot\", which is my web root, no matter where I called it from
>
> What did you get when you tried that snippet in your testing?
>
> On Jun 6, 6:53 pm, "Taco Fleur" <[EMAIL PROTECTED]> wrote:
> > Created application-root.cfm with following code
> >
> > 
> >  request.applicationRoot = getDirectoryFromPath(
> getCurrentTemplatePath() );
> >  request.applicationRoot = reReplaceNoCase( request.applicationRoot, "(
> > \\|/)$ ", "" );
> > 
> >
> > Snippet of the application.cfc
> >
> >  >   name="onApplicationStart"
> >   returntype="boolean"
> >   output="false">
> >
> >   
> >   
> >variables.mode = "unknown";
> >result = reFindNocase( "(
> >
> \\|/)+(development|testing|staging|production)(\\|/)+",
> > request.applicationRoot, 1, true );
> >if ( arrayLen( result.pos ) gt 1 ) {
> > variables.mode = mid( request.applicationRoot, result.pos[ 3 ],
> > result.len[ 3 ] );
> >}
> >   
> >>name="application.web.root"
> >default=""
> >type="string">
> >>name="application.root"
> >default="/#this.application_name#"
> >type="string">
> >>name="application.mode"
> >default="#variables.mode#"
> >type="string">
> >
> > On 6/6/07, David Harris <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > any chance of example code of what you did Taco?
> > > It'll help me understand the issue :-)
> >
> > > On Jun 6, 6:23 pm, "Taco Fleur" <[EMAIL PROTECTED]> wrote:
> > > > Thank god!
> >
> > > > I've already solved the matter by creating a normal .cfm file and
> > > include it
> > > > in the onApplicationStart - I was just hoping for a solution that
> would
> > > not
> > > > involve any code outside the application.cfc
> >
> > > > On 6/6/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
> >
> > > > >  Taco,
> >
> > > > > I know what you are saying now, there is an answer but I have it
> in
> > > code I
> > > > > have at home.
> >
> > > > > Andrew Scott
> > > > > Senior Coldfusion Developer
> > > > > Aegeon Pty. Ltd.
> > > > >www.aegeon.com.au
> > > > > Phone: +613  8676 4223
> > > > > Mobile: 0404 998 273
> >
> > > > > *From:* cfaussie@googlegroups.com [mailto:
> [EMAIL PROTECTED]
> > > *On
> > > > > Behalf Of *Taco Fleur
> > > > > *Sent:* Wednesday, 6 June 2007 3:52 PM
> > > > > *To:* cfaussie@googlegroups.com
> > > > > *Subject:* [cfaussie] Re: Get root of the application
> >
> > > > > I give up
> >
> > > > > On 6/6/07, *David Harris* <[EMAIL PROTECTED]> wrote:
> >
> > > > > I just created a folder struct of [root]/one/two/bob.cfm
> > > > > and put the code:
> > > > > #getDirectoryFromPath(expandPath("/"))#
> >
> > > > > in bob.cfm, and it gave me the correct web root...
> >
> > > > > I also put a onRequestStart function in my Application.cfc:
> >
> > > > > 
> > > > > 
> > > > > here: #getDirectoryFromPath(expandPath("/"))#
> > > > > 
> > > > > 
> >
> > > > > ran "/one/two/bob.cfm"...and the correct web root was output
> >
> > > > > so from my testing
> > > > > #getDirectoryFromPath(expandPath("/"))#
> >
> > > > > works every time...
> >
> > > > > On Jun 6, 5:30 pm, "Taco Fleur" <[EMAIL PROTECTED] > wrote:
> > > > > > If you put this in the main application.cfc file and then make
> sure
> > > the
> > > > > app
> > > > > > is not initialized, call a page within the sub directory (i.e.
> the
> > > one
> > > > > where
> > > > > > the application.cfc is that extends the main one) then you will
> get
> > > the
> > > > > path
> > > > > > of the sub directory and not the main root.
> >
> > > > > > I've now created a .cfm file that is included onApplicationStart
> and
> > > > > sets
> > > > > > the appropiate variable.
> >
> > > > > > On 6/6/07, David Harris < [EMAIL PROTECTED]> wrote:
> >
> > > > > > > how bout this?:
> >
> > > > > > > #getDirectoryFromPath(expandPath("/"))#
> >
> > > > > > > On Jun 6, 2:45 pm, "Taco Fleur" <[EMAIL PROTECTED]> wrote:
> > > > > > > > Does that work for you if you put it in an application.cfcthat
> > > > > extends
> > > > > > > the
> > > > > > > > root application.cfc, and access a page in that sub
> directory
> > > first,
> > > > > > > also
> > > > > > > > make sure the app is not initialised yet.
> >
> > > > > > > > Let me know..
> >
> > > > > > > > On 6/6/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
> >
> > > > > > > > >  This not work for you, sure works for me?
> >
> > > > > > > > > getDirectoryFromPath(getCurrentTemplatePath())
> >
> > > > > > > > > Andrew Scott
> > > > > > > > > Senior Coldfu

[cfaussie] Re: Get Working Week

2007-06-06 Thread Dale Fraser

Yeah,

My work week ends Friday, thus from a programmatic point of view, it starts
Saturday.

Regards
Dale Fraser

http://dalefraser.blogspot.com


-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Haikal Saadh
Sent: Wednesday, 6 June 2007 5:14 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week


Isn't 'working week' a locale specific thing?

Western work weeks are Monday to Friday, but I do know a few countries 
which finish work Sun-Thurs.


Andrew Scott wrote:
>
> Goes back to the standard that Sunday is the start of a week.
>
>
>
> Andrew Scott
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au 
> Phone: +613 8676 4223
> Mobile: 0404 998 273
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Dale Fraser
> *Sent:* Wednesday, 6 June 2007 4:41 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Re: Get Working Week
>
> Got it sorted dur!
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> #friday#
>
> Not sure why Coldfusion starts the week on a Sunday, is this some kind 
> of standard, not in the real world I would think.
>
> Regards
>
> Dale Fraser
>
> http://dalefraser.blogspot.com
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Dale Fraser
> *Sent:* Wednesday, 6 June 2007 4:33 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Re: Get Working Week
>
> Problem is my Week ends on Friday.
>
> Not Satuarday.
>
> Regards
>
> Dale Fraser
>
> http://dalefraser.blogspot.com
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Andrew Scott
> *Sent:* Wednesday, 6 June 2007 4:17 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Re: Get Working Week
>
> Which part are you not getting to work?
>
> This is a very common JS Calendar problem that has been solved that 
> many times...
>
> A bit more info on why you think it is not working would be good. Or 
> even code example maybe.
>
>
>
> Andrew Scott
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au 
> Phone: +613 8676 4223
> Mobile: 0404 998 273
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Dale Fraser
> *Sent:* Wednesday, 6 June 2007 4:00 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Get Working Week
>
> I need to get working week.
>
> Which for me is Sat - Fri.
>
> I can't get it to work in all situations and am missing something 
> really obviousl.
>
> Have a look here, but read my comments, doesn't work.
>
>
http://ray.camdenfamily.com/index.cfm/2007/6/5/Ask-a-Jedi-What-day-is-Wednes
day
>
> Regards
>
> Dale Fraser
>
> http://dalefraser.blogspot.com
>
>
>
> >






--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get root of the application

2007-06-06 Thread David Harris

So from what you have there, the line of code in the included file:
request.applicationRoot =
getDirectoryFromPath( getCurrentTemplatePath() );

is the one to get you the root of the application?

I would expect:
expandPath("/")

to give you that too, no matter where in the application you run it,
from a .cfm or a .cfc, 1 folder deep or 10 folders deep

I have only tested this on my dev machine, and it returns "C:\Inetpub
\wwwroot\", which is my web root, no matter where I called it from

What did you get when you tried that snippet in your testing?

On Jun 6, 6:53 pm, "Taco Fleur" <[EMAIL PROTECTED]> wrote:
> Created application-root.cfm with following code
>
> 
>  request.applicationRoot = getDirectoryFromPath( getCurrentTemplatePath() );
>  request.applicationRoot = reReplaceNoCase( request.applicationRoot, "(
> \\|/)$ ", "" );
> 
>
> Snippet of the application.cfc
>
>name="onApplicationStart"
>   returntype="boolean"
>   output="false">
>
>   
>   
>variables.mode = "unknown";
>result = reFindNocase( "(
> \\|/)+(development|testing|staging|production)(\\|/)+",
> request.applicationRoot, 1, true );
>if ( arrayLen( result.pos ) gt 1 ) {
> variables.mode = mid( request.applicationRoot, result.pos[ 3 ],
> result.len[ 3 ] );
>}
>   
>   name="application.web.root"
>default=""
>type="string">
>   name="application.root"
>default="/#this.application_name#"
>type="string">
>   name="application.mode"
>default="#variables.mode#"
>type="string">
>
> On 6/6/07, David Harris <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> > any chance of example code of what you did Taco?
> > It'll help me understand the issue :-)
>
> > On Jun 6, 6:23 pm, "Taco Fleur" <[EMAIL PROTECTED]> wrote:
> > > Thank god!
>
> > > I've already solved the matter by creating a normal .cfm file and
> > include it
> > > in the onApplicationStart - I was just hoping for a solution that would
> > not
> > > involve any code outside the application.cfc
>
> > > On 6/6/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
>
> > > >  Taco,
>
> > > > I know what you are saying now, there is an answer but I have it in
> > code I
> > > > have at home.
>
> > > > Andrew Scott
> > > > Senior Coldfusion Developer
> > > > Aegeon Pty. Ltd.
> > > >www.aegeon.com.au
> > > > Phone: +613  8676 4223
> > > > Mobile: 0404 998 273
>
> > > > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED]
> > *On
> > > > Behalf Of *Taco Fleur
> > > > *Sent:* Wednesday, 6 June 2007 3:52 PM
> > > > *To:* cfaussie@googlegroups.com
> > > > *Subject:* [cfaussie] Re: Get root of the application
>
> > > > I give up
>
> > > > On 6/6/07, *David Harris* <[EMAIL PROTECTED]> wrote:
>
> > > > I just created a folder struct of [root]/one/two/bob.cfm
> > > > and put the code:
> > > > #getDirectoryFromPath(expandPath("/"))#
>
> > > > in bob.cfm, and it gave me the correct web root...
>
> > > > I also put a onRequestStart function in my Application.cfc:
>
> > > > 
> > > > 
> > > > here: #getDirectoryFromPath(expandPath("/"))#
> > > > 
> > > > 
>
> > > > ran "/one/two/bob.cfm"...and the correct web root was output
>
> > > > so from my testing
> > > > #getDirectoryFromPath(expandPath("/"))#
>
> > > > works every time...
>
> > > > On Jun 6, 5:30 pm, "Taco Fleur" <[EMAIL PROTECTED] > wrote:
> > > > > If you put this in the main application.cfc file and then make sure
> > the
> > > > app
> > > > > is not initialized, call a page within the sub directory (i.e. the
> > one
> > > > where
> > > > > the application.cfc is that extends the main one) then you will get
> > the
> > > > path
> > > > > of the sub directory and not the main root.
>
> > > > > I've now created a .cfm file that is included onApplicationStart and
> > > > sets
> > > > > the appropiate variable.
>
> > > > > On 6/6/07, David Harris < [EMAIL PROTECTED]> wrote:
>
> > > > > > how bout this?:
>
> > > > > > #getDirectoryFromPath(expandPath("/"))#
>
> > > > > > On Jun 6, 2:45 pm, "Taco Fleur" <[EMAIL PROTECTED]> wrote:
> > > > > > > Does that work for you if you put it in an application.cfc that
> > > > extends
> > > > > > the
> > > > > > > root application.cfc, and access a page in that sub directory
> > first,
> > > > > > also
> > > > > > > make sure the app is not initialised yet.
>
> > > > > > > Let me know..
>
> > > > > > > On 6/6/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
>
> > > > > > > >  This not work for you, sure works for me?
>
> > > > > > > > getDirectoryFromPath(getCurrentTemplatePath())
>
> > > > > > > > Andrew Scott
> > > > > > > > Senior Coldfusion Developer
> > > > > > > > Aegeon Pty. Ltd.
> > > > > > > >www.aegeon.com.au
> > > > > > > > Phone: +613  8676 4223
> > > > > > > > Mobile: 0404 998 273
>
> > > > > > > > *From:* cfaussie@googlegroups.com [mailto:
> > > > [EMAIL PROTECTED]
> > > > > > *On
> > > > > > > > Behalf Of *Taco Fleur
> > > > > > > > *Sent:* Wednesday, 6 June 2007 12:31 PM
> > > > > > > > *To:* cfaussie@googlegroups.com
> > > > > > > > *Subject:* [cfauss

[cfaussie] Re: Get Working Week

2007-06-06 Thread Haikal Saadh

Isn't 'working week' a locale specific thing?

Western work weeks are Monday to Friday, but I do know a few countries 
which finish work Sun-Thurs.


Andrew Scott wrote:
>
> Goes back to the standard that Sunday is the start of a week.
>
>
>
> Andrew Scott
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au 
> Phone: +613 8676 4223
> Mobile: 0404 998 273
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Dale Fraser
> *Sent:* Wednesday, 6 June 2007 4:41 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Re: Get Working Week
>
> Got it sorted dur!
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> #friday#
>
> Not sure why Coldfusion starts the week on a Sunday, is this some kind 
> of standard, not in the real world I would think.
>
> Regards
>
> Dale Fraser
>
> http://dalefraser.blogspot.com
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Dale Fraser
> *Sent:* Wednesday, 6 June 2007 4:33 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Re: Get Working Week
>
> Problem is my Week ends on Friday.
>
> Not Satuarday.
>
> Regards
>
> Dale Fraser
>
> http://dalefraser.blogspot.com
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Andrew Scott
> *Sent:* Wednesday, 6 June 2007 4:17 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Re: Get Working Week
>
> Which part are you not getting to work?
>
> This is a very common JS Calendar problem that has been solved that 
> many times...
>
> A bit more info on why you think it is not working would be good. Or 
> even code example maybe.
>
>
>
> Andrew Scott
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au 
> Phone: +613 8676 4223
> Mobile: 0404 998 273
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Dale Fraser
> *Sent:* Wednesday, 6 June 2007 4:00 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] Get Working Week
>
> I need to get working week.
>
> Which for me is Sat - Fri.
>
> I can't get it to work in all situations and am missing something 
> really obviousl.
>
> Have a look here, but read my comments, doesn't work.
>
> http://ray.camdenfamily.com/index.cfm/2007/6/5/Ask-a-Jedi-What-day-is-Wednesday
>
> Regards
>
> Dale Fraser
>
> http://dalefraser.blogspot.com
>
>
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Andrew Scott
Goes back to the standard that Sunday is the start of a week.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Wednesday, 6 June 2007 4:41 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

Got it sorted dur!

 









 



 



#friday#

 

Not sure why Coldfusion starts the week on a Sunday, is this some kind of
standard, not in the real world I would think.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Wednesday, 6 June 2007 4:33 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

Problem is my Week ends on Friday.

 

Not Satuarday.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 6 June 2007 4:17 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

Which part are you not getting to work?

 

This is a very common JS Calendar problem that has been solved that many
times...

 

A bit more info on why you think it is not working would be good. Or even
code example maybe.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Wednesday, 6 June 2007 4:00 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Get Working Week

 

I need to get working week.

 

Which for me is Sat - Fri.

 

I can't get it to work in all situations and am missing something really
obviousl.

 

Have a look here, but read my comments, doesn't work.

 

http://ray.camdenfamily.com/index.cfm/2007/6/5/Ask-a-Jedi-What-day-is-Wednes
day

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

 

 

 

 

 

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Andrew Scott
Dale,

 

I realise that, but the problem is that the value for Saturday is 7.

 

So 



 

So the comparision or logic would be is 

 



 A working week



Weekend



 

Mind you this is off the top of my head



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Wednesday, 6 June 2007 4:33 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

Problem is my Week ends on Friday.

 

Not Satuarday.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 6 June 2007 4:17 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

Which part are you not getting to work?

 

This is a very common JS Calendar problem that has been solved that many
times...

 

A bit more info on why you think it is not working would be good. Or even
code example maybe.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Wednesday, 6 June 2007 4:00 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Get Working Week

 

I need to get working week.

 

Which for me is Sat - Fri.

 

I can't get it to work in all situations and am missing something really
obviousl.

 

Have a look here, but read my comments, doesn't work.

 

http://ray.camdenfamily.com/index.cfm/2007/6/5/Ask-a-Jedi-What-day-is-Wednes
day

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

 

 

 

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---