Steve Bang wrote:
>
> Anything within a JSP custom tag is interpreted only the first time a page
> is loaded.

Maybe I'm missing something here, but a custom tag is executed for every
request.

> So, if I have a run-time expression value defining an attribute
> value in the tag, when the page loads, it reads in the current value, then
> on subsequent reloads any changes in that value are ignored.

A request time attribute value, for a standard tag as well as a custom tag,
is evaluated for every request.

> What if I
> actually want this value to be updated on a page reload, because the value
> is changing?  With standard JSP syntax, I can set the scope on a bean -- is
> there an easy way to do the same when using a custom tag instead?  The goal
> here is to not have to resort to the useBean syntax for non-savvy developers
> who are using the tags.

Unless I miss something, you shouldn't have to worry about this at all; just
define that the custom tag attribute accepts a request time attribute value
in the TLD, and set the value with a JSP expression in the JSP page.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to