I have the following code:
<c:choose>
<c:when test="${empty sessionScope.languageRB}">
<html:hidden property="language" value="en"/>
<html:hidden property="country" value="GB"/>
</c:when>
<c:otherwise test="${not empty sessionScope.languageRB}">
<html:hidden property="language" value="<%=languageRB.getString("style.language")%>"/>
<html:hidden property="country" value="<%=languageRB.getString("style.country")%>"/>
</c:otherwise>
</c:choose>
languageRB is an attribute stored in session, of type ResourceBundle. I want to do the following: if languageRB exists in session then the property is defined using the value of the string in the paranthesis, otherwise the property is set to a default value.
I'm getting the following error:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 89 in the jsp file: /pages/common002-preparelogin.jsp
languageRB cannot be resolved
88: <c:otherwise test="${not empty sessionScope.languageRB}">
89: <html:hidden property="language" value="<%=languageRB.getString("style.language")%>"/>
90: <html:hidden property="country" value="<%=languageRB.getString("style.country")%>"/>