En l'instant précis du 07/03/07 14:43, Gerald Holl s'exprimait en ces
termes:
> David Delbecq wrote:
>> En l'instant précis du 07/03/07 12:04, Gerald Holl s'exprimait en ces
>> termes:
>>> David Delbecq wrote:
>>>> Please provide the full jsp please.
>>>> Side note: JSF and non-JSF tags do not mix very well.
>>>   <c:forEach items="#{handler.fields}" var="it">
>>>     <h:inputText id="fieldPercent" value="#{it.percentValue}"/>
>>>     <h:message for="fieldPercent"/>
>>>   </c:forEach>
>> Sorry, should have seen it in your first message:
>> items="#{handler.fields}" <-- this expression is not evaluated by
>> tomcat. In jsp 2.0, expression must have the form
>> ${handler.fields}
>
> According to [1] the #{} should work with the new unified EL.
> If I try your hint I can't view the page anymore:
> Error: According to TLD or attribute directive in file, attribute
> items does not accept any expressions.
>
[1] unified EL refers to jsp 2.1 specifications, i was referring to 2.0
specifications.
To ensure you are using 2.1 specifications, check mainly that
- your taglib contains "<jsp-version>2.1</jsp-version>"
- your webapplication is properly configured to use the webapp2.5
specifications. The root element of web.xml should be like
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>

When this is done, remove JSF stuff and do this inside your body tag:
-------
 Just to be sure unified EL works, here is the request parameter named
x: #{param.x}<br/>
You can change it by requesting
http://server/webapp/jspname.jsp?x=fooBar<br/>
Now i will iterate over handler.fields<br/>
  <c:forEach items="#{handler.fields}" var="it">
    Found field with value: #{it.percentValue}
  </c:forEach>
-------
>
> The handler is not a JSF managed bean, it's a Spring managed bean. I
> think this should work.
Not sure, but i don't know the inners of spring.
>
> cheers,
> Gerald
>
> [1] http://java.sun.com/products/jsp/reference/techart/unifiedEL.html
>



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to