• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with .properties file

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am facing a problem with a value from application.properties file.
My project is in spring. I have a .jspf file where I get the key value from application.properties file. Infact the value I have assigned to key is larger. Like



Value of the property may not be meaningful to you. I have such large value in it. I have some special characters in the value. I use these special character to split the value into different parts and assign it to different variables to use.


Problem is , when i have my web page open for long time(more than one or two hours ),then I am not seeing this property value on my form. I see blank in that place. But when i restart the server or redeploy the application then i will get this value.

Can anyone tell me whats wrong with this process?

Thanks

Edited for line length--the line break in the property file is not there in the actual file.
 
Sheriff
Posts: 7134
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your application reads the .properties file everytime when your application needs to get a value? Or, does it fetches the values once, and stores them on the application scope to be used later?
 
Mukhi Vla
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have this file loaded two times from applicationContext.xml

1.
2.

I am loading the same properties file second time as resourceBundle to access the keys from JSP pages. With the first configuration i am not able to read the keys from JSP page. I have both the configurations in applicationContext.xml
 
Devaka Cooray
Sheriff
Posts: 7134
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem seems related to some Springy stuff - moving this to the Spring forum.
 
reply
    Bookmark Topic Watch Topic
  • New Topic