File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Using c:import with JSF deferred expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Using c:import with JSF deferred expression" Watch "Using c:import with JSF deferred expression" New topic

Using c:import with JSF deferred expression

Ronan Dowd
Ranch Hand

Joined: Jan 21, 2006
Posts: 84
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

I agree. Here's the link:
subject: Using c:import with JSF deferred expression
It's not a secret anymore!