Puneet, Thank you for your response. The problem is that this does not work outside of the land of struts configuration. Using struts configuration, each jsp has access to all the keys in the Messages.properties file for its module (or actually, whichever module the ActionForm that forwards to that jsp is in). However, my servlet does not have a struts module and thus any jsp it forwards to has no inherent Messages.properties file from which to retrieve keys. It is possible to retrieve these keys from inside my servlet by using the ResourceBundle.getBundle() function with the argument being the fully qualified class name of the Messages.properties file. But when I try to access these keys from my jsp using the <bean:message> tag I get an error, leading me to believe that there must be some other place where the keys recognized by that tag are being populated, I simply don't know where.
On 8/15/06, Puneet Lakhina <[EMAIL PROTECTED] > wrote:
On 8/16/06, James Sanders <[EMAIL PROTECTED] > wrote: > > Working within a larger struts system, it became necessary for me to > create > a servlet, which co-exists with, but outside of, the system. This has > worked > very well, but I now find myself wishing to use the functionality of > <bean:message> and MessageResource files in a jsp outside the struts > realm. > It is not difficult to simply use a ResourceBundle to retrieve the > necessary > messages into my servlet, but I can't seem to figure out how to make these > messages accessible through <bean:message> in my jsp. Does anyone know the > mechanism struts (or anything else) uses to make this happen? > > If you want to use a key from ur properties file in ur jsp, u could simply do.. <bean:messgae key = "some.key" /> this will put the value of the key here.. im not sure this wat u wanted to ask..but in case its this then well n good.. -- Puneet