Open GoogleCodeExporter opened 9 years ago
Did you set up your jmesaMessagesLocation in the web.xml?
http://code.google.com/p/jmesa/wiki/Messages
Original comment by jeff.johnston.mn@gmail.com
on 12 May 2011 at 7:00
Yeah, I did followed this guide, and i pointed it to the properties file
What I did, as follows:
<context-param>
<param-name>jmesaMessagesLocation</param-name>
<param-value>MyResourceBundle</param-value>
</context-param>
and my directory
-WEB-INF/
|-classes/
|-MyResourceBundle.properties
|-MyResourceBundle_en.properties
|-MyResourceBundle_ms.properties
So the properties file MyResourceBundle.properties and its alliances is at
WEB-INF/Classes/
However, in the MyResourceBundle.properties, I only defined key-value pair for
my project-specific wordings. The ones from jmesa is not included. Is this
another concern?
Is this the correct configuration?
Thanks in advance!
Original comment by Inventor...@gmail.com
on 13 May 2011 at 1:32
That is the correct configuration...do you get any errors? The only thing that
I see that I did not expect was having a MyResourceBundle.properties file. But
it should still work.
If you have logging turned on you should see an error message saying that it
cannot find the resource bundle.
Also, make sure that your IDE is not removing these files. Typically you would
put these files in your source directory and when you compile they get placed
in with your classes.
Are you using the tag library or API? What version of JMesa are you on? Once I
know that I can show you how to debug this. We will get this!
Original comment by jeff.johnston.mn@gmail.com
on 13 May 2011 at 6:30
Nope, I did not get any errors. I am using log4j, and I had included the
required libraries for it, as according to
http://code.google.com/p/jmesa/wiki/SLF4J
I had also double checked the properties file in the server, and am sure that
it has not been removed by the IDE.
I am using jmesa 3.0.3 though... I am planning to switch to the use of taglib
in future, but for now, it will be API due to shortage of time :|
I am sure that this should work, an I am just missing somewhere.. Thanks for
the advice in advance! :)
BR/Nic :)
Original comment by Inventor...@gmail.com
on 14 May 2011 at 12:25
At this point the easiest way to debug this would be to just copy the
ResourceBundleMessages.java into your project, fix up the package declaration,
and then run it locally. You can inject it into your TableModel with the
tableModel.setMessages() method.
http://code.google.com/p/jmesa/source/browse/trunk/jmesa/src/org/jmesa/core/mess
age/ResourceBundleMessages.java
I will be curious to see what you find...the messages has been working really
well overall.
Original comment by jeff.johnston.mn@gmail.com
on 15 May 2011 at 8:04
Sorry for the late reply. Had been on leave few days ago.
Alright, I will try that in my next step, and let you know the result! :)
Thanks!!
BR/Nic :)
Original comment by Inventor...@gmail.com
on 19 May 2011 at 2:30
I have the same issue, I have copied the ResourceBundleMessages.java in my
project, and I have instanciated a WebContext with the request:
HttpServletRequestWebContext WebContext = new
HttpServletRequestWebContext(request);
after the webContext is used in:
ResourceBundleMessages kk = new ResourceBundleMessages("", WebContext);
and the last thing is:
System.out.println(kk.getMessage("html.statusbar.resultsFound"));
The courious thing is that the request is in English Locale and the message
appear in spanish, debugging I can see that the propertyResourceBundle is
caching:
CacheKey[org/jmesa/core/message/resource/jmesaResourceBundle, lc=es_ES,
ldr=WebappClassLoader
and it not take my new locale
Original comment by Elias.Ma...@gmail.com
on 11 Jul 2012 at 11:39
Original issue reported on code.google.com by
Inventor...@gmail.com
on 12 May 2011 at 4:22