0 Replies Latest reply on Jan 17, 2008 5:21 AM by mars1412

    constants in java code and webpage

    mars1412 Apprentice

      I need to access some constants in javacode and in the webpage
      e.g. when the user uploads some files, I need to get the filesize for the upload component in the webpage and also on the serverside in my uploadServlet.

      I'd like to define the constant in some java class as static final.
      What is the easiest way to access this variable?

      I have created a stateless session bean that has the static final constants defined and has a local interface with getters for those constants.
      moreover I have annotated this bean with @ReadOnly and @BypassInterceptors (hoping for better performance...)

      is there a better way of doing this?