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...)