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

  • SEARCH
  • Home
  • 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 6543045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:17:57+00:00 2026-05-25T11:17:57+00:00

Grails 1.3.7 I have some configuration located in an external config file. One of

  • 0

Grails 1.3.7

I have some configuration located in an external config file. One of the entires looks like this:

site.maintenance.mode = false

I have a filter which checks for certain config settings for specific URLs. When I do a run-app or deploy a WAR into Tomcat and do:

boolean maintenanceMode = grailsApplication.config.site.maintenance.mode

maintenanceMode is coming back true. If I look at the config object in debug mode, this is what I get:

site={maintenance={mode=false, message="<p>Our trail guides are working hard to get the system back on track.</p><p>We're sorry, the account system is down for maintenance at the moment.  We'll get it back online as quickly as we can.  Thanks for your patience.</p>"}}

I have a controller that I use to reload this config file dynamically and hitting this controller will fix the issue. But I’m curious as to why it is incorrect on first runs and why the discrepency in what is getting put in the maintenanceMode variable vs what is actually in the config object.

  • 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-25T11:17:57+00:00Added an answer on May 25, 2026 at 11:17 am

    Are you using a Java properties file or a Groovy file? If you’re using a properties file then I believe Grails will interpret site.maintenance.mode=false the same way as site.maintenance.mode='false' and since Groovy will interpret:

    "false".asBoolean() == true
    

    then that would explain why you would see that initial true value.

    I just ran a simple test locally to verify this behavior. When I externalize my properties in a file called test.properties then site.maintenance.mode=false initially gets a boolean value of true, when I use a file called test.groovy then it interprets the boolean value of site.maintenance.mode=false as false. I believe this is because when you use a Groovy file Grails uses ConfigurationSlurper to process it but when you use a properties file Grails interprets everything as String name/value pairs.

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

Sidebar

Related Questions

Some one please tell me how to handle RunTimeExceptions in grails version1.1 .I have
I have some text area field in my grails application. I got the following
I know java well, and have some experience in EclipseLink, Hibernate, JSF, Grails and
I have an application developed in Grails 2.0.4, I am hard coding some of
I have this Grails application wherein I installed JQuery, JQuery-UI, and JQGrid plugin. I
imagine the following problem in grails you have some kind of audit trail domain
i have some knowledge of css,jQuery,Grails,django,servlets and jsp still i can't see me designing
I have grails server on http://mysite.com:8086/project/ ApiController renders some text(html code in my case)
I have a grails project with some additional java source files under src/java folder.
I have a grails project that depends on some native code, which will vary

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.