小编use*_*271的帖子

在Struts 2和JSP中使用带有多个参数的getText()

我正在使用JSP开发Struts2框架.我有*.properties文件:

hover_remove=Remove access to {0} at {1}`
Run Code Online (Sandbox Code Playgroud)

我在JSP中的提交标记中:

title="%{getText('hover_remove', new String[]{{appLabel}, {locationLabel}})}"
Run Code Online (Sandbox Code Playgroud)

这将在Java中工作,但我在JSP中遇到以下错误:

/WEB-INF/pages/admin/cm/view.jsp(9,287) 
JSPG0055E: Unable to create an xml attribute from name
Run Code Online (Sandbox Code Playgroud)


getText(String, List String[])在JSP中 使用的任何提示?

jsp struts2 properties-file dynamic-variables

5
推荐指数
1
解决办法
5486
查看次数

标签 统计

dynamic-variables ×1

jsp ×1

properties-file ×1

struts2 ×1