Setting/changing a date in application.cfm

I need to be able to set a date in the application.cfm file
for example
<CFSET APPLICATION.stopdate='10/15/2014'>
Then in my site on other pages I have code that says
<cfif reportdate GT #APPLICATION.stopdate#>Do This</cfif>
The problem is sometimes I need to change the APPLICATION.stopdate to another date during the middle of the day.
For example I need to change the APPLICATION.stopdate from 10/15/2014 to 10/25/2014
However I notice when I change the  APPLICATION.stopdate in the application.cfm to another date during the middle of the day that the APPLICATION.stopdate stays the old date.
How do I make sure that the APPLICATION.stopdate changes sitewide when I change it in the application.cfm?
Do I use another variable scope?

Yes, that's one use of the include directive, lets you add content inline. You missed an "@" there though. It's <%@ include...
EDIT: One word of warning; it is not mandatory for the container to recompile the including JSPs if the included resource is changed! It seems you have a smart container which detected that your included JSP had been modified and so it's reflecting the changes in the other files too. But this is not required behaviour and so you shouldn't count on it. AFAIK, Tomcat will also do the same.
Also, this is a good reason why, even though it seems like a good idea to put the DB URL into one JSP and include it everywhere so that you have only one entry to change when the DB changes, it's still risky. A better way would be to put it as a <context-param> or something similar.
Edited by: nogoodatcoding on Sep 28, 2007 10:15 PM

Similar Messages

  • Set default to date in Application Express?

    Hi;
    Is there a way to do the following in Application Express?
    create table t (
    col1 number,
    col2 date default cast(systimestamp at time zone 'UTC' as date))
    ie, via the UI set a default TIMESTAMP to the system time? I have not been able to find a way to set the default for an existing column in the IDE anywhere.
    thanks - dave

    I can do a trigger, it's just that the setting it as
    the default is cleaner IMO. And it can be done with a
    script, I was just trying to see if it could be done
    in Application Express.
    What is "default setup with table"?
    thanks - daveWhen I am in TOAD, building a table, I can add a default clause, that will assign a default value to the column, if I do not present one when I insert data into the data row..
    See the attached article link for more info:
    http://builder.com.com/5100-6388-5239302.html
    Thank you,
    Tony Miller
    UTMB/EHN

  • Passing variable from one server to another within different application.cfm

    hello all.
    currently , i have 3 server..
    each is installed with coldfusion server.
    let says,
    server A,server B, and server C.
    server A has the application.cfm for login.
    from server A , I want to carry the login ID to server B(also
    has application.cfm) or server C(also has application.cfm) without
    having to login again.
    Present, what I facing right now..
    server A has the application.cfm login and then direct to
    server B(also has application.cfm).
    But at server B it will request user to relogin.
    Same with server C.
    should I changed and modified the application.cfm in server B
    and C by removing 'cflogin statement'?
    I have no idea.. :chomp: :confused:
    Please anybody, help me with this..

    I'll admit I'm not the most educated on application/session
    management but I'll try and help.
    When a user logs into your CF server, it creates the session,
    which is only for that server. That's probably the issue you're
    running into when the user jumps from one server to the next. You
    might want to try using a cookie and CFTOKEN on the login (server
    A) and then use the application.cfm file on server B and C to check
    for the existence of the token. If it's there (in the client
    cookie) then it would allow them access.
    ---set the application in the application.cfm page on all 3
    servers to the same name---
    <cfapplication name="myappname"
    sessionmanagement="Yes"
    clientmanagement="Yes"
    SESSIONTIMEOUT=#CreateTimeSpan(1, 0, 0, 0)#
    setclientcookies="yes">
    ---then check for the cookie value on each server as well---
    <CFIF IsDefined("Cookie.CFID") AND
    IsDefined("Cookie.CFTOKEN")>
    <CFSET Variables.CFID_LOCAL=Cookie.CFID>
    <CFSET Variables.CFTOKEN_LOCAL=Cookie.CFTOKEN>
    <CFCOOKIE NAME="CFID" VALUE="#Variables.cfid_local#">
    <CFCOOKIE NAME="CFTOKEN"
    VALUE="#Variables.cftoken_local#">
    </cfif>
    There might be some yes/no variables in the session
    management you can set (yes on A, no on B and C) if the above does
    not work. But with the users jumping across servers, the cookie
    might be the best answer for you.
    Actually, I realized something. You would want to set the
    setclientcookies only on server A but have B and C check for the
    cookie.
    Hope some of this helps.

  • Setting Username/Password in Application.cfm

    I'm just moving my DB from Access over to MSSql, and I'm
    having difficulty figuring out how to set a global
    username/password in Application.cfm.
    I am able to set the username and password within the
    individual queries (using username= and password=) but I'd like to
    set the username and password within application.cfm so I do not
    have to go and change each and every cfquery statement throughout
    my site.
    So, essentially, I'm looking to insert code int he
    Application.cfm which logs into the MSSQL server, so whenever a
    cfquery is executed, the db is already logged into.
    Thanks!
    Andrew

    You can set application variables for your user name and
    password within application.cfm, then use those variables in your
    cfquery and cfstoredproc tags. That will allow you to change the
    value in one place instead of having to do it everywhere. As for
    staying logged on to the server, you may want to consider checking
    the Maintain Connections option in your advanced settings for your
    particular data source in ColdFusion Administrator.
    Phil

  • My laptop died last night and the date and time was set for 1/1/2000. I went to change the date and time and cannot. For some reason when i pull up system preferences it will not load date and time but will load other stuff. Please help.

    Last night my laptop died and the time and date was reset. I cannot acess date and time preferences to change it and my laptop is acting really weird. My CD drive is broken so there are no options to put in a cd. Please someone help i need my laptop for school and cannot afford another.

    Many system actions will misbehave, given an inaccurate date. Resetting the NVRAM and / or SMC will not fix it, and if the system has a preposterous date you may not be able to open System Preferences to correct it. This dilemma may or may not be addressed in a future OS X update.
    If you cannot open System Preferences you can reset your system date and time using Terminal.
    Please read everything that follows before proceeding. Write them down if necessary because the effects of setting a preposterous system date are unpredictable.
    Quit System Preferences, force quit if necessary: OS X: How to quit an unresponsive application using Force Quit
    Open Terminal - it is in your Utilities folder and looks like this
    You can find Terminal by using the Finder's Go menu and choosing Utilities, then double-click the Terminal icon.
    At the prompt, you will be typing a command resembling the following:
    sudo date mmddhhnnyyyy
    ... but you must substitute the actual date and time in the command that corresponds to the date format used for your location. In other words if your custom is to use a date like 8 February 2014 then reverse the mm and dd values.
    Substitute numerals in the above command according to the following:
    mm = month
    dd = date
    hh = hour (24 hour format)
    nn = minutes past the hour
    yyyy = year
    Each of those values must be two digits except for the year which can be two or four digits. As an example if the current date and time is February 8, 2014 at 9 PM your command will be the following:
    sudo date 020821002014
    or
    sudo date 0208210014
    Either one will work. If you enter nonsensical values the system will attempt to parse the entry correctly.
    To recover from your inability to use System Preferences to set the date and time, the value entered does not have to be precise, it just has to be approximate.
    Enter that command using the actual time and date for your location and in the appropriate format, then press the Return key. Terminal will ask for your Admin Password - the same one you use when you log in to your Mac. Type it and then press the Return key. What you type will not appear, not even with •••• characters.
    To determine if your change was effective just type the date command and press the Return key. Terminal will reply with the date and time. If it appears correct and in the correct format, you should be able to open System Preferences > Date & Time once again. Selecting the "Set time and date automatically" and choosing an appropriate time server will adjust your Mac's system clock to the precise time.

  • Application.cfm - Should I use queries or set session variables?

    Hi,
    I have an application that has many users for many different
    companies logged in at the same time using the system. I use the
    application.cfm to call and set a bunch of variables that make the
    system work, such as preferences and things. Would it be better to
    use 5 or 6 queries all pulling one record, or call the queries only
    once at the start of the session and set 30 to 50 session variables
    based on the query results? Which method would bog the system down
    less? It seems that session variables use quite a bit of memory.
    I'm just trying to get the "simple answer" for this, if that's even
    possible.
    Please let me know your thoughts and experience on this.
    Thanks much,
    Jeff W!

    In order to give you a simple "do it this way" answer, more
    information is needed.
    How long does it take to run those 5-6 queries on each
    request? How many users are logged in at peak times? How much data
    would you be storing in the session for each user? How much RAM do
    you have on your server?
    On one application, we've decided to go the session variable
    route. The size for each users' session maxes out at 2.5 KB. We
    have 512 MB dedicated to CF, but can easily scale up on the
    hardware we have to 1.5 GB or more. At 512 MB, 2.5 KB per user
    session, we can handle a little over 200,000 concurrent users
    (assuming all CF memory could be utilized for session variables,
    which isn't true). There are only 6,000 users total in our system,
    so we have quite a bit of headroom.
    Are you on CF8? If so, open up the server monitor, start
    monitoring, profiling, and memory tracking, and log in with a
    couple users (with your code setup to store all that info in the
    session). See how much storage each session takes. Then look at
    your server. How much RAM do you have? what do you currently have
    allocated to ColdFusion? What's your peak concurrent user level? Do
    you have headroom? Also, see if the benefits of storing it in the
    session are even worth it (how long do those 5-6 queries add to
    each requst?)

  • The clock is set to a date before 1 Jan 2008 and some applications may behave erratically.

    hi. this afternoon. I accidently set my time to 1987.
    then after awhile. I cant borswer any website. then I try to open app store. And it is all white pages.
    but all my sofeware are still working.
    then i reastar my Imac. it shows "your clock is set to a date before Jan1. 2008"
    okay. And I was going to change it.
    but it dosnt let me.
    I opened the setting. but it just shows loading date & time forever.
    i had wait for a hour already. still show like that.
    thx. i really need help. what can i do . it drives me crazy ...

    If you can launch Terminal (found in /Applications/Utilities) you should be able to run the date command.  For example, if you do this now, you could run:
    sudo date 011120462014
    That should set your time to January (01) 11 (11) 8 (20):46 p.m. 2014.
    R-
    <Edited by Host>

  • Changing Administrative data in Layout set (SE71)

    Hi All,
    I have copied another system layout set extract & uploaded into my system by changing user name in the extract.
    But i got few fields wrongly updated in Adminitstrative data. I have already made some changes to layout set. so i can't upload again.
    Now i want to change fields: Created On, By, Release: & Changed on, By, Release:
    fields in the Administrative data tab in header data of layout set(SE71).
    Can anybody tell me how can i change this data!
    Thanks,
    Deep.

    Hi,
    If you have authorizations to open the layout in Change mode then you can change the fields names as well as Values  By knowing the correct field names.

  • How to change the Data sources after deploying the application ??

    Hi All,
    i want to know how to change the Data sources after deploying the application to the application server ???
    I'm using Oracle Application Server 10g Release 3 (10.1.3.1.0)

    Can you access the Enrprise Manager website of the target Application Server from your location? If so, you can change the datasource in it. If not, yo can bundle the datasource definition in your archive and use that one instead of the one configured in the target OC4J container. Or this will just be the responsability of your customer: whenever you send a new WAR file, they have to modify the datasource if needed and deploy the application?

  • Need a BADI for Change Own Data Application to implement customer needs

    Hi All,
      I wanted to know the specific BADI which could be used for doing customer specific coding for 'Change Own Data" application.
    Here the need is to do some business specific checks to suit the the customer needs
    Best Regards,
    Sowmya

    Hi Sowmya,
    We are also having same kind of requirement so I was wondering if you can help me with the kind of solution that you implemented. BADI name or Implementation code etc.,
    Appreciate any inputs on this...
    Thanks,
    Rgds,
    Lakshmi

  • Date setting change

    Hello everybody,
    I have little confusion, on my server date setting is like M/d/yyyy.
    SAP on windows 2003 and SQL server 2005 platform.
    Please suggest if  I change date format from M/d/yyyy to dd/mm/yyyy, what will impact?
    is any impact on report, transaction etc.
    Thanks
    Ganesh

    Hello Ganesh,
    There is no issue in changing the date format as Arjun also said in the last post.. Usually Dates are shown as what is set in user profile..in SU01...
    More info : Note 1379084 - Conversion of date from external to internal format

  • I changed my data plan yesterday. I should have set it to change at the new month which is tomorrow. can i fix this?

    I changed my data plan yesterday. I should have set it to change at the new month which is tomorrow. can i fix this?

    I don't know if they'll be able to change it or not, but it's worth calling Customer Service ASAP (since you indicate your billing cycle starts tomorrow, so that would be midnight tonight) and asking.
    Customer Service
    Dial *611 from a cell phone
    (800) 922-0204
    Monday - Sunday 6 am - 11 pm

  • ICal sync- alert says will delete all past entries- Yes, I have my Keep Appointments set to "forever" AND I've tried changing the date range in desktop mgr- HELP

    I just did the update for the software on the 8530.  This is a new problem since the update.  I cannot lose my old entries, so I am unable to sync at all now until Blackberry addresses this bug.
    I have read through all of the "fixes" but none of them work.
    My Keep Appointments setting has always (and I verified is still) set to "forever"
    I went into the advance settings on the MAC desktop software from Blackberry and tried changing the date range to the suggested 14 days past and 365 days future.  I even tried changing the past days parameter to "1" in hopes it would simply ignore old entries... It still wants to delete 435 past entries.
    I have to keep these.
    Help, Blackberry!  Your "update" to the software is overriding my settings and has made the sync function unusable.

    Christina,
    Thanks for the reply. I unchecked all calendars in iCal and synced and it still gave me the same notice. So then I went into the iTunes window and checked the sync only certain calendars box (instead of the all calendars box) and left all the calendars unchecked and clicked apply but when I click on sync it automatically reverts to all calendars.
    When you say you unchecked all calendars did you mean in iCal? And what did you have your iCal settings at in your iTunes sync window?
    I appreciate your help,
    Andrea

  • BAPI_ADMGMTSO_CHANGE for change billing data set of mam order

    Dear,
    i  change Start of Copy/Publication Date Period of mam order using  BAPI_ADMGMTSO_CHANGE this bapi but the billing dataset can't change it's date(i.e serv.date,edservdate).
    Give the solution for above problem.

    Hi,
    in this BAPI 'BAPI_ADMGMTSO_CHANGE' you have to pass update parameter.
    for example you are going to change item data, then you have to update
    item table and itemx table.
    and check the documentation of the BAPI.
    Test program is also avilable for this BAPI. in SE37 give the BAPI name and click the 'Where used list' button, it will show the test program.
    Regards,
    Boobalan S

  • Application.cfm /cflocation and redirection of changed link

    I have a link on my site http://www.mysite.com/ssl/oldpage.cfm that I have renamed to http://www.mysite.com/ssl/newpage.cfm.
    Many of my users have the old page bookmarked etc..................
    Is there a way to put code in the application.cfm that says if user trys to go to old page automatically redirect them to the new page?

    Not in the application CFC.
    But there is a great place to put code like that in most web server configurations.
    If not that, then the next level would be defining the "missing template handler" in the ColdFusion administrator.
    Finally, if you can't do either or those, keep the old file, but replace all of it's code with a <cfheader...> redirect (or a <cflocation...> permanent redirect if you are on a new version of ColdFusion.
    But, really, this is a web server level task and that is the best place to put this if you have contorl of yours.

Maybe you are looking for