Hi,

in order to load a message from a *.properties file from a servlet, I used
to do:

new ActionSupport().getText(messageKey);

It used to work in Struts versions up to 2.3.15.3.

In Struts 2.3.16+ versions, now I get a NPE:

java.lang.NullPointerException
at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:361)
 at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:208)
at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:123)
 at com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:103)

Is there a new way (or even an old one :) to get messages from a servlet
context?

Thanks in advance,
Bruno

Reply via email to