Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JSP Help

0 views
Skip to first unread message

Brad Long

unread,
Nov 11, 2009, 9:17:56 PM11/11/09
to
I have some code that does this (it works):

<js:formatDate value="${job.runtimeInformation.nextFireTime}"/>

This also works:

<js:formatDate value=<%= addYear(new Date())%>/>

This does not work:

<js:formatDate value="<%= addYear(${job.runtimeinformation.nextFireTime})
%>"/>

I suppose it is because I am mixing <%= %> and ${}

Can anyone help - what must I do to fix it?

Thanks in advance.

Lew

unread,
Nov 11, 2009, 9:25:04 PM11/11/09
to

'<%= %>' encloses *Java* source that writes to the Response 'out' stream.
'${}' encloses *Expression Language* (EL) source that is interpreted by the
application server.

You should not need nor use Java scriptlet if you are rigorous in your use of
tag libraries and EL. If you must use scriptlet, you cannot use EL inside of
it. Instead, use the Java expression to which the EL evaluates.

--
Lew

Daniel Pitts

unread,
Nov 11, 2009, 9:28:46 PM11/11/09
to

try
<%=addYear(job.getRuntimeInformation().getNextFireTime())%>

0 new messages