首页 > 其他 > 详细

struts2 <s:text>的一个问题

时间:2014-02-13 03:27:05      阅读:390      评论:0      收藏:0      [点我收藏+]

Issue

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

And use <s:text> in jsp to display this message like this :  <s:text name="hm.tool.test.librarySip.comment" />

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 <s:text> in jsp like this :  <s:text name="librarySipComment" />



 

Reason

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

struts2 <s:text>的一个问题

原文:http://blog.csdn.net/liangoo7/article/details/19125541

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!