Announcement Announcement Module
Collapse
No announcement yet.
Confusing about accesing static field from app-context.xml Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Confusing about accesing static field from app-context.xml

    Hi All,
    I am new to spring and I want to access final static field from app-context.xml.....
    I found the solution is to use util:constant and my problem is resolved...
    But I want to access this without util:constant namespace...

    So how can I achieve this..???? please help me.


    Thanks in Advance.

  • #2
    I don't think it's possible.
    Why you can't use the util namespace?

    Stefano

    Comment


    • #3
      if you have a class named
      com.mycompany.myproduct.services.MyService
      which has a public static final int PAGE_SIZE = 10, you can access its value via
      #{T(com.mycompany.myproduct.services.MyService).PA GE_SIZE}
      . You don't have to use the <util> namespace anywhere.

      Comment

      Working...
      X