首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

struts绑定多个资源文件的步骤

2012-09-08 
struts绑定多个资源文件的方法message-resources keydriver nulltrue parameterResources_Driver

struts绑定多个资源文件的方法
<message-resources key="driver" null="true" parameter="Resources_Driver" />
看到了key值了么在jsp页面上通过
<bean:message key="label.contract_type" bundle="contract"/>调用Resources_Contract中的资源
<bean:message key="label.driver_type" bundle="driver"/>调用Resources_Driver中的资源

ActionErrors中调用的方法不变,只是在jsp页面上输出时要加bundle值
<html:errors bundle="contract"/>输出Resources_Contract中定义的错误消息
<html:errors bundle="driver"/>输出Resources_Driver中定义的错误消息

?

热点排行