Announcement Announcement Module
No announcement yet.
webAppRootKey returned as null in System.getProperty() Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • webAppRootKey returned as null in System.getProperty()

    I have a webapp using Spring and JSF.

    I have the following in web.xml:
    HTML Code:
    In my backing bean, I call:

    ... but the result is null. Any ideas as to why it is null... it used to work before, and I haven't modified any configuration files since. So I'm stumped. Any advice would be greatly appreciated!

    P.S., I posted this in reply to thread 211465 (I would post a link but haven't made enough posts to include links...) I feel it deserves its own thread

  • #2
    any ideas? I'm having same problem too.. Need ur helps..


    • #3
      As far as i know context-param(s) is/are stored in the ServletContext and are used to initialize the servlet. They cannot/shouldnt be used as System poperties. Use plain property files and to expose them to your spring beans.

      EDIT: I saw your previous post and looks like there is a way someone was able to retrieve servlet init parameters using System.getProperty, but my advice still stands. Depending on what container you are using that approach might or might not work. Its definitely not according to the J2ee Spec. So i think you are better off using regular properties bundles for distributing token values.
      Last edited by maheshguruswamy; Nov 1st, 2010, 03:25 PM.