Forum LAMS for Tech-Heads - General Forum: Displying ApplicationResource Strings


 
You may request notification for Displying ApplicationResource Strings.
Search: 

1: Displying ApplicationResource Strings
04/12/10 09:32 AM
[ Reply | Forward ]
Hi everyone

I'm developing a new form inside a tool.

For that matter, I create 3 more variables inside the conf/language/lams/ApplicationResources.properties file.

For example, one variable is named newform.login

When I display it in my JSP file, I use the tag fmt:message with key property.

The thing is, when I deploy the tool and test it in the browser, it shows ??? newform.login ??? in the spot where the string is located.

Why does this happen?

Thanks in advance.

Posted by Felipe Peña

2: Re: Displying ApplicationResource Strings
In response to 1 04/12/10 02:51 PM
[ Reply | Forward ]
Hi Felipe,

If you do changes to labels in the ApplicationsResources files, when you deploy your tool, these files get copied to the lams-dictionary.jar folder:

jboss-4.0.2/server/default/deploy/lams.ear/lams-dictionary.jar/

Say you modified them for the Q&A tool, then the files will be copied to:

jboss-4.0.2/server/default/deploy/lams.ear/lams-dictionary.jar/org/lamsfoundation/lams/tool/qa/

Note that these labels are loaded at JBoss start up time, so if you have modified labels directly under the lams-dictionary.jar folder, you will need to restart LAMS.

Also, it's make sure you delete the:

* jboss-4.0.2/server/default/tmp
* jboss-4.0.2/server/default/work

directories, as at times they cache some labels data in there.

Thanks,

Ernie

Posted by Ernie Ghiglione

3: Re: Re: Displying ApplicationResource Strings
In response to 2 04/12/10 04:27 PM
[ Reply | Forward ]
Thanks for the reply Ernie.

Should that still work if I'm using JBOSS 5.1.0?

Posted by Felipe Peña

4: Re: Re: Re: Displying ApplicationResource Strings
In response to 3 04/12/10 04:34 PM
[ Reply | Forward ]
Yes, same thing.

Thanks,

Ernie

Posted by Ernie Ghiglione

5: Re: Re: Re: Re: Displying ApplicationResource Strings
In response to 4 04/27/10 08:24 AM
[ Reply | Forward ]
Hi Ernie

For some reason, the ApplicationResources.properties and ApplicationResources_en_AU.properties files do not get copied while I'm starting the JBOSS server.

I have 3 variables added to these files. I have checked the ones placed in jboss/server/default/deploy/lams.ear/lams.dictionary.jar, and they don't display these variables.

Maybe I should run an ant action to do this.

Thanks in advance.

Posted by Felipe Peña

6: Re: Re: Re: Re: Re: Displying ApplicationResource Strings
In response to 5 04/27/10 08:56 AM
[ Reply | Forward ]
The ApplicationResources.properties files don't get copied when JBoss starts but when you run the ant deploy-war task for your tool (see http://is.gd/bJVnj).

However, if you don't want to wait for all rebuilding your war, you can just copy the files manually to to the jboss-xx/server/default/deploy/lams.ear/lams-dictionary.jar/org/lamsfoundation/lams/tool/(your-tool-name) directory yourself.

Although, you will need to restart JBoss for those changes to take effect as the labels get loaded into memory on JBoss start up. (I don't think you can flush them and force them to reload again when LAMS is running)

Ernie

Posted by Ernie Ghiglione

7: Re: Re: Re: Re: Re: Re: Displying ApplicationResource Strings
In response to 6 04/30/10 12:57 PM
[ Reply | Forward ]
Right, I had alredy thought about doing that.

Thanks for the help. I really appreciate it!

Posted by Felipe Peña

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum