Results 1 to 3 of 3

Thread: Confusing about accesing static field from app-context.xml

  1. #1

    Post 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. #2
    Join Date
    Jun 2009
    Location
    Vicenza, Italy
    Posts
    84

    Default

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

    Stefano

  3. #3
    Join Date
    Dec 2009
    Location
    India
    Posts
    108

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •