Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Old Tony #1
Enabling J2EE Memory Variables
My question relates to ColdFusion MX 7 running under Win 2003.
If I have a hosted site where the ISP refuses to enable J2EE Memory Variables
on the server, but I need to use J2EE memory variables, is there a way to
invoke them just for my site, say via Application.cfm?
I've not found any reference to this elsewhere.
I'd be grateful for any info.
Regards
Old Tony
Old Tony Guest
-
j2ee session variables
hi, i have been trying to use session variables in my app. I have enabled the session variables in the cf admin, and in the application.cfc. ... -
J2EE and CF Memory Variables settings
We have a CFMX 7 server at work which has been set up for application development and testing. It is intended to server multiple developers whose... -
J2EE environment variables
Hi all, I need to know how to set the J2EE environment variables. I can see that the JAVA_HOME environment variable is set, but i also need the... -
J2EE Session Variables (a.k.a. whaaaaa?)
Okay, I've got J2EE sessions enabled, and I've got some clean up code in onSessionEnd in an Application.cfc. The code runs fine on a timeout (BTW,... -
Enabling ssl on web?
Server: Apache/1.3.26 (Unix) Debian GNU/Linux mod_ssl/2.8.9 OpenSSL/0.9.6g mod_perl/1.26 PHP/4.1.2 Hello, how do I start apache w/ ssl support?... -
MikerRoo #2
Re: Enabling J2EE Memory Variables
I believe the setting is server wide.
You can set it programmatically from Application.cfm using the Admin API.
BUT... To use the API, you need the admin or an RDS password.
I've posted sample code, below.
But it sounds like you need to correct your ISP.
-- MikeR
<CFSCRIPT>
sInitVal = "";
if (IsDefined ("FORM.sPassWord"))
sInitVal = FORM.sPassWord;
</CFSCRIPT>
<CFOUTPUT>
<form method="post">
<p>
Enter the admin or RDS password:
<input type="password" name="sPassWord" value="#sInitVal#">
</p>
<input type="submit" value="Login and switch J2EE sessions.">
</form>
</CFOUTPUT>
<CFSCRIPT>
if (IsDefined ("FORM.sPassWord"))
{
//--- Login is always required. This example uses two lines of code.
///*
adminObj = createObject("component","cfide.adminapi.administr ator");
adminObj.login ("#sInitVal#"); //, rdsPasswordAllowed="true");
//*/
//--- Instantiate the runtime control object. ---
RT_Obj = createObject("component","cfide.adminapi.runtime") ;
bAreSessionsEnabled = RT_Obj.getScopeProperty ("enableJ2EESessions");
WriteOutput ("<h4>J2EE Sessions = #bAreSessionsEnabled#</h4>");
RT_Obj.setScopeProperty ("enableJ2EESessions", "no");
bAreSessionsEnabled = RT_Obj.getScopeProperty ("enableJ2EESessions");
WriteOutput ("<h4>J2EE Sessions = #bAreSessionsEnabled#</h4>");
RT_Obj.setScopeProperty ("enableJ2EESessions", "yes");
bAreSessionsEnabled = RT_Obj.getScopeProperty ("enableJ2EESessions");
WriteOutput ("<h4>J2EE Sessions = #bAreSessionsEnabled#</h4>");
}
</CFSCRIPT>
MikerRoo Guest



Reply With Quote

