Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7433767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:43:29+00:00 2026-05-29T09:43:29+00:00

I have a coldfusion site with an application.cfm. It has a cfapplication defined in

  • 0

I have a coldfusion site with an application.cfm. It has a cfapplication defined in it:

<cfapplication name="FhaApp" clientmanagement="no"
           sessionmanagement="yes" sessiontimeout="#createTimeSpan(0,0,360,0)#">

<cflock timeout="120" name="#session.sessionID#" type="exclusive">
<cfcookie name="CFID" value="#session.CFID#" >
<cfcookie name="CFTOKEN" value="#session.cftoken#" >
</cflock>
<cfparam name="session.fromwhere" default="">
<cfif #cgi.SCRIPT_NAME# contains 'default-partner-'>
    <cfif not ISDEFINED("cookie.fromwhere")>
<cfcookie name="fromwhere" value="#right(cgi.SCRIPT_NAME,         (len(cgi.SCRIPT_NAME)-1))#" expires="30">
    <cfset session.fromwhere = #right(cgi.SCRIPT_NAME,(len(cgi.SCRIPT_NAME)-1))#>
    </cfif> 
 </cfif>

 <cfset datasourcename="fha47">

 <cfparam name="application.dsn" default="fha47">

 <cfparam name="session.loggedin" default="false">
 <cfparam name="session.ppcid" default="101">
 <cfparam name="session.cid" default="FHA">

I want to add another cfapplication that looks like this:

<cfapplication name = "QSvalues" 
sessionTimeout = "#CreateTimeSpan(0,0, 0, 60)#" 
sessionManagement = "yes">


<cflock scope = "Session" 
timeout = "30" type = "Exclusive">
<cfif NOT IsDefined("session.prop_st")>
    <cfset session.prop_st = "">
</cfif>
<cfif NOT IsDefined("session.prop_zip")>
    <cfset session.prop_zip = "">
</cfif>
<cfif NOT IsDefined("session.address")>
    <cfset session.address = "">
</cfif>
<cfif NOT IsDefined("session.email")>
    <cfset session.email = "">
</cfif>
<cfif NOT IsDefined("session.fname")>
    <cfset session.fname = "">
</cfif>
<cfif NOT IsDefined("session.lname")>
    <cfset session.lname = "">
</cfif>
<cfif NOT IsDefined("session.pri_phone_1")>
    <cfset session.pri_phone_1 = "">
</cfif>
<cfif NOT IsDefined("session.pri_phone_2")>
    <cfset session.pri_phone_2 = "">
</cfif>
<cfif NOT IsDefined("session.pri_phone_3")>
    <cfset session.pri_phone_3 = "">
</cfif>
</cflock>

<cflock scope = "Application" timeout = "30" type = "Exclusive">
<cfif NOT IsDefined("application.number")>
    <cfset application.number = 0>
</cfif>
</cflock>

My question is, can you define two separate cfapplication in the main application.cfm?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:43:29+00:00Added an answer on May 29, 2026 at 9:43 am

    I’m not entirely sure why you would want or need the second cfapplication; it’s not really clear from your code or explanation. I think you could probably put another one in there, but it would likely override the previous one.

    Besides, in your code all you’re doing is writing to the application scope.. that’s not really declaring another cfapplication.

    A couple of tips though… your big cfif area for the session values, just use cfparam:

    <cfparam name="session.prop_st" default="">
    

    That way if it doesn’t already exist, it will be created.

    Also, if you’re using the latest ColdFusion, you don’t need to cflock around session scopes. You should be locking around the application scope settings, but since you’re setting them in Application.cfm, it’s kinda silly.. I would use another scope, like the request scope.

    On your cfif cgi.script_name, you don’t need # signs around that variable. The only times you need them are when they’re quoted or are being outputted in a cfoutput (or when used with Evaluate() to create dynamic variables).

    I hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ColdFusion 9.0.1. I have a new web site that uses Bikes.cfm
I have started design of a ColdFusion application that is entirely web based. Not
i have some questions about constructors in ColdFusion : must i use the name
My ColdFusion (MX7 on IIS 6) site has search functionality which appends the search
I have a web-site written in ColdFusion that contains both the usual interactive web
I have a test site and a live site on ColdFusion 9. I'm trying
I am using ColdFusion 9.0.1 I have a new site that is accessible through
Let's say, on a ColdFusion site, that the user has navigated to http://www.example.com/sub1/ The
I have an old site built in Coldfusion, a new site built in Rails.
I have been asked to migrate a ColdFusion site that is running on Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.