struts2 (s:text)的一个问题

2014-11-24 02:40:49 · 作者: · 浏览: 1

Issue:

There is a message defined in hmResources.properties like this: hm.tool.test.librarySip.comment =Note: To test the verification of a library patron's account, enter a valid user name or barcode and password or PIN.

And use in jsp to display this message like this :

You can find the apostrophe after “patron’” can’t be displayed.

Solution1:

use ‘’(Two ‘) instead of ‘


Solution2:

Define a method in action :

public String getLibrarySipComment(){

return MgrUtil.getResourceString("hm.tool.test.librarySip.comment");

}

Then use in jsp like this :



Reason:

I don’t the reason, who can help to explain?