2012-08-22 16 views
0

如何讓Tomcat吞下這條線?我嘗試了所有報價組合!JSP中的第四個嵌套引用

<liferay-ui:search-container-column-text name="howstheweather" 
    value="<liferay-ui:message key='<%=("Sun").equals(timeBean.today())?"sunny-day-msg":"take-umbrella-msg"%>'/>" 
/> 

詢問是否有任何解決方案,在其他JSP標籤的價值評估不改變爲EL和JSLT

回答

1

不能使用JSP標籤。但<liferay-ui:search-container-column-text .../> -Tag具有translate屬性。希爾爲您解決方案:

<liferay-ui:search-container-column-text name="howstheweather" 
    value='<%=("Sun").equals(timeBean.today())?"sunny-day-msg":"take-umbrella-msg"%>' 
    translate='true' 
/>