JSTL fmt:setBundle and JSF
843842Jan 19 2004 — edited Jan 20 2004I am converting the code and JSP pages I had from jsf ea4 to jsf rel 1
My bundle is Labels.properties (.properties file)
Now, my JSTL fmt:setBundle is not recognized . My jsp code is:
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://jakarta.apache.org/struts/tags-faces"%>
<fmt:setBundle basename="Labels" scope="session" var="labelsBundle"/>
<f:view>
<s:html locale="true">
<head>
<title><fmt:message bundle="${labelsBundle}" key="form.heading.login"/></title>
<s:base/>
<link href="style/wless.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Log in -->
<stf:form action="/listProjectTasks.do" method="post" focus="loginID" >
<h:output_text value="#{labelsBundle.label.login.loginID}" />
...
-----------
I get the following exception:
There has been an unspecified exception (javax.servlet.jsp.JspException: Illegal Model Reference in this context for expression 'labelsBundle.label.login.loginID'.)!
This used to work in ea4 when I had the key/bundle attributes.
How can I access my properties file at sessionScope using the #{} notation or else?
Thanks,
Gisella