I am working on the Struts2 framework with JSP. I have in my *.properties file:
hover_remove=Remove access to {0} at {1}`
I have in my JSP, within a submit tag:
title="%{getText('hover_remove', new String[]{{appLabel}, {locationLabel}})}"
which would work in Java, but I'm getting the following error in JSP:
/WEB-INF/pages/admin/cm/view.jsp(9,287)
JSPG0055E: Unable to create an xml attribute from name
Any tips for using getText(String, List String[])
in JSP?
If you want to create array of String-s then you need to use FQN for the class and remove not needed braces.
BUT you can use
getText
method which acceptsList
as the second argument and take advantage of OGNL list creation feature. In OGNL to create a list you need to simple put a list of expressions in curly braces.