Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

problem with <c:out> and fn:trim

843838Jun 30 2007 — edited Jul 1 2007
Hi all

I have a problem using jstl functions

I have a tag file with following code
<%@ taglib uri="/WEB-INF/tlds/c-1_0-rt.tld" prefix="c_rt" %>
<%@ taglib uri="/WEB-INF/tlds/fn.tld" prefix="fn" %>
<%@ attribute name="path" required="true" %>
<%@ attribute name="base" required="false" %>

<c_rt:url value="/${path}" var="realPath" />
<c_rt:out value="${fn:trim(realPath)}"  />
when I am using this tag file the output is ${fn.trim(realPath)} with no error or exception, it seems that c:url and c:out dont work !!!

but when I change the tld from c-1_0-rt.tld to c-1_0.tld the c:url and c:out work fine but I can't use fn:trim() because they dont accept expression values

what is wrong with my code?

both tld files are existing under the WEB-INF/tlds directory

in second state the following exception will be thrown:
org.apache.jasper.JasperException: <h3>Validation error messages from TagLibraryValidator for c</h3><p>8: tag = 'out' / attribute = 'value': An error occurred while parsing custom action attribute "value" with value "${fn:trim(realPath)}": org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.</p>
any help would be appreciated
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2007
Added on Jun 30 2007
1 comment
300 views