struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Klava <bkl...@gmail.com>
Subject NPE in ActionSupport.getText() from servlet
Date Tue, 06 May 2014 16:30:33 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message