I want to display a specific message based on the request URL in the JSP.
The request URL may be:
/app/cars/{id}
OR
/app/people/{id}
On mine messages.propertiesI have:
events.action.cars=My car {0} event
events.action.people=My person {1} event
Finally, on my JSP page, I want to have the following code:
<spring:message code="events.${element.cause}.${?????}"
arguments="${element.param['0']},${element.param['1']}"/>
I need help figuring out which expression I can use to parse the request URL and get the word before the identifier.
source
share