Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using c:import with JSF deferred expression  RSS feed

Ronan Dowd
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Having an issue with JSF (1.2) and JSTL (a c:import tag).
I know that JSP and JSF have differing lifecycles so using JSTL and JSF within the same JSP can yield unpredicatable results..

My JSP (fragment) contains the below (customerBean is a JSF managed, session-scope, bean):

<c:import url="${}"/>

On initial page load I get a exception as below

Error 500: org.apache.taglibs.standard.tag.common.core.NullAttributeException: The "url" attribute
illegally evaluated to "null" or "" in <import>

It looks like the evaluation of ${} is not occurring at the same time as that of the c:import, hence the url attribute being null or empty string
I tried changing it to use a deferred expression as below but no joy:

<c:import url="#{}"/>

Interestingly If I replace the c:import with the below it prints the correct value
<hutputText value="#{}"/>
so it's as if the value is known within the context of the JSF bean

I've tried using jsp include action and directive as below but no joy either

<%@include file="${}"/>
<jsp:include page="${}"/>

Any help would be great

Thanks, Ro
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!