[cfaussie] Re: application.cfc prblems

2006-01-26 Thread Shib71
According to the Macromedia livedocs,
in a cfc you set the corresponding application variables in the cfc
init (before any of the methods). Try setting
application.sessionManagement to yes.

BlairOn 1/27/06, Dale Fraser [EMAIL PROTECTED] wrote:
I thought you didn't need it anymore with application.cfcThat's what all the this. Variables do?RegardsDale Fraser -Original Message- From: 
cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Shib71 Sent: Friday, 27 January 2006 2:13 PM To: 
cfaussie@googlegroups.com Subject: [cfaussie] Re: application.cfc prblems If you're using session or client variables you need to enable them using the cfapplication tag. You probably had that in the origonal file but
 forgot to move it over. Blair On 1/27/06, Dale Fraser [EMAIL PROTECTED] wrote: Converting an application to use 
application.cfc from .cfm Can't get it to work. I get on my login page an error. The requested scope session has not been enabled. Before session variables can be used, the session state management
 system must be enabled using the CFAPPLICATION tag. My application.cfc looks like this cffunction name=onApplicationStart returntype=boolean
 output=false !--- Setup Datasouce ---
cfset datasource = ListGetAt(CGI.PATH_INFO, 1, /) / cfif find(.cfm, datasource)
cfset datasource = listGetAt(CGI.SERVER_NAME, 1, .) / /cfif !--- Setup Variables --- cfset this.version
 = 2.0.0 /
cfset this.name http://this.name= datasource
/ cfset this.started = now() /
cfset this.filePath = expandPath(..) /
cfset this.clientManagement = true /
cfset this.sessionManagement = true /
cfset this.loginStorage=cookie /
cfset this.sessionTimeout = createTimeSpan(0, 2, 0, 0) / !--- Read Configuration ---
cfset this.config = structNew() / !--- Read XML Config File --- cffile action=""> file=#this.filePath#\config\#datasource#\config.xml charset=utf-
 8 variable=config /
cfset configXml = XmlParse(config) /
!--- Get Site Config Paramaters ---
cfset nodes = xmlSearch(configXml, //site/*) /
cfloop index=i from=1 to=#arrayLen(nodes)#
cfset this.config[ucase(nodes[i].XmlName)] = nodes[i].XmlText / /cfloop
!--- Get Session Config Parameters ---
cfset nodes = xmlSearch(configXml, //session/text()) /
cfset this.config.sessionNames = arrayNew(1) /
cfloop index=i from=1 to=#arrayLen(nodes)#
cfset arrayAppend(this.config.sessionNames, nodes[i].XmlValue) / /cfloop cfreturn true / /cffunction
 Regards Dale Fraser


[cfaussie] Re: application.cfc prblems

2006-01-26 Thread Matthew Walker
You mean when you cfdump the application scope?

-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dale 
Fraser
Sent: Friday, 27 January 2006 4:46 p.m.
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: application.cfc prblems


Yep,

Also now find that when I dump application.cfm, I get heaps of crap,
function / object type references. Is this normal?



[cfaussie] Re: application.cfc prblems

2006-01-26 Thread Dale Fraser
 (returns void)
 
separatorChar char  
separator \  
pathSeparatorChar char  
pathSeparator ;  
 
jrun.jsp.JSPEngine Application Config - object of jrun.jsp.JSPEngine
 
Methods loadClass (returns java.lang.Class)
loadClass (returns java.lang.Class)
destroy (returns void)
getServletContext (returns interface javax.servlet.ServletContext)
setKeepGenerated (returns void)
setTranslationDisabled (returns void)
setCacheTags (returns void)
setImmediateRelease (returns void)
setOutputDir (returns void)
isImmediateRelease (returns boolean)
getJavaCompiler (returns jrunx.compiler.JavaCompiler)
isKeepGenerated (returns boolean)
isCacheTags (returns boolean)
getJSTSuffixes (returns [Ljava.lang.String;)
getBasePath (returns java.lang.String)
getOutputDir (returns java.lang.String)
deletePageState (returns void)
getPageState (returns jrun.jsp.PageState)
getStandardTagLibrary (returns javax.servlet.jsp.tagext.TagLibraryInfo)
getTagLibraryInfo (returns javax.servlet.jsp.tagext.TagLibraryInfo)
resolveTagLibraryURI (returns java.lang.String)
translateJST (returns boolean)
hashCode (returns int)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
equals (returns boolean)
notify (returns void)
notifyAll (returns void)
toString (returns java.lang.String)
 
JSP_STL_URI http://java.sun.com/dtd/jsp_1_2  
 
name orangezebra  
started {ts '2006-01-27 14:53:36'}  
testid 890  
version 2.0.0  
Session Details - struct 
accountid 2  
accountname 001  
returnto /orangezebra/progress.cfm?CFID=1602CFTOKEN=93798196  
urltoken CFID=1602CFTOKEN=93798196  
struct [empty]

Regards
Dale Fraser


 -Original Message-
 From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Matthew Walker
 Sent: Friday, 27 January 2006 3:00 PM
 To: cfaussie@googlegroups.com
 Subject: [cfaussie] Re: application.cfc prblems
 
 You mean when you cfdump the application scope?
 
 -Original Message-
 From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Dale Fraser
 Sent: Friday, 27 January 2006 4:46 p.m.
 To: cfaussie@googlegroups.com
 Subject: [cfaussie] Re: application.cfc prblems
 
 
 Yep,
 
 Also now find that when I dump application.cfm, I get heaps of crap,
 function / object type references. Is this normal?




[cfaussie] Re: application.cfc prblems

2006-01-26 Thread Andrew Scott

Dale,

You need to define the application setting that was once used as attributes
in the tag, as global variables to the cfc.

cfcomponent
 cfset this.SessionManagement = '' /

 cffunction ...
 /cffumction

/cfcomponent

I haven't really played around with the application.cfc, but have found that
scoped variables works very different in the Application.cfc.

HTH


Regards
Andrew Scott
Analyst Programmer

CMS Transport Systems
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9699 7988  -  Fax: 03 9699 7976

Quote:
...the myth of socialism is far stronger than the reality of capitalism.
That is because capitalism is not really an ism at all. It is what people do
if you leave them alone. - Arnold Beichmen, Hoover Institute Fellow 

--

-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Friday, 27 January 2006 2:17 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: application.cfc prblems


I thought you didn't need it anymore with application.cfc

That's what all the this. Variables do?

Regards
Dale Fraser


 -Original Message-
 From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Shib71
 Sent: Friday, 27 January 2006 2:13 PM
 To: cfaussie@googlegroups.com
 Subject: [cfaussie] Re: application.cfc prblems
 
 If you're using session or client variables you need to enable them using
 the cfapplication tag. You probably had that in the origonal file but
 forgot to move it over.
 
 Blair
 
 
 On 1/27/06, Dale Fraser [EMAIL PROTECTED] wrote:
 
 
   Converting an application to use application.cfc from .cfm
 
   Can't get it to work.
 
   I get on my login page an error.
 
   The requested scope session has not been enabled.
   Before session variables can be used, the session state management
 system
   must be enabled using the CFAPPLICATION tag.
 
   My application.cfc looks like this
 
   cffunction name=onApplicationStart returntype=boolean
 output=false
   !--- Setup Datasouce ---
   cfset datasource = ListGetAt(CGI.PATH_INFO, 1, /) /
   cfif find(.cfm, datasource)
   cfset datasource = listGetAt(CGI.SERVER_NAME, 1,
 .) /
   /cfif
 
   !--- Setup Variables ---
   cfset this.version = 2.0.0 /
   cfset this.name http://this.name  = datasource /
   cfset this.started = now() /
   cfset this.filePath = expandPath(..) /
   cfset this.clientManagement = true /
   cfset this.sessionManagement = true /
   cfset this.loginStorage=cookie /
   cfset this.sessionTimeout = createTimeSpan(0, 2, 0, 0) /
 
   !--- Read Configuration ---
   cfset this.config = structNew() /
 
   !--- Read XML Config File ---
   cffile action=read
   file=#this.filePath#\config\#datasource#\config.xml charset=utf-
 8
   variable=config /
   cfset configXml = XmlParse(config) /
 
   !--- Get Site Config Paramaters ---
   cfset nodes = xmlSearch(configXml, //site/*) /
   cfloop index=i from=1 to=#arrayLen(nodes)#
   cfset this.config[ucase(nodes[i].XmlName)] =
   nodes[i].XmlText /
   /cfloop
 
   !--- Get Session Config Parameters ---
   cfset nodes = xmlSearch(configXml, //session/text()) /
   cfset this.config.sessionNames = arrayNew(1) /
   cfloop index=i from=1 to=#arrayLen(nodes)#
   cfset arrayAppend(this.config.sessionNames,
   nodes[i].XmlValue) /
   /cfloop
 
   cfreturn true /
   /cffunction
 
   Regards
   Dale Fraser