Re: periodic refresh with JSTL c:import

2002-12-18 Thread Shawn Bayern
On Wed, 18 Dec 2002, Brian Buckley wrote:

 How can one use JSTL to do something in between, such as to update the
 c:import once an hour?
 
 c:if test=??? test if applicationScope.x is more than an hour old ???
 c:import url=channel.jsp var=x scope=application 
  c:param name=rssUrl value=http://www.slowurl.rss; /
 /c:import
 /c:if
 c:out value=${applicationScope.x} escapeXml=false /

You could create a Date object and compare the time property of this
object against the current time; Hans has shown how to do this in previous
messages.

It might be easier to use the Cache Taglib, which isn't part of JSTL but
does exactly what you're looking for.

-- 
Shawn Bayern
JSTL in Action   http://www.manning.com/bayern


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: periodic refresh with JSTL c:import

2002-12-18 Thread Brian Buckley
 You could create a Date object and compare the time property of this
 object against the current time; Hans has shown how to do this in previous
 messages.

 It might be easier to use the Cache Taglib, which isn't part of JSTL but
 does exactly what you're looking for.

Thanks, Shawn.  I found the Hans example and it does just what I need.

In case you failed to notice :), my snippets were lifted from JSTL In
Action.  Excellent book.



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]