Subbarayan Ramanathan wrote:

> There are a variety of books available and personal preference plays a
> great part in the books one likes. Regarding the original question of
> assigning the contents of a tag to a java variable, I think there is no
> elegant way of doing it.

I asked this question a while back, and there is a pretty easy way to handle
this.
Search the archives for:   "exposing script variables".


> It is probablt possible to use the page context
> object however, it would seem weird to use a server side code to just
> assign the contents printed out by a custom tag to a java script variable.
> I appreciate feedback if I am wrong.
>

You may want to retrieve an object (other than a string) in order to perform
an method from it, say for instance, a resultset.
Another possibility it that you would want to retrieve a string from the
request/session (or from a resource bundle)  that will need to be used in
other custom tags.  Since custom tag attributes cannot contain another custom
tag, the only method of passing these values around is through a script
variable.


> Thanks,
> Ram
>

HTH,
    Pete

>
> -----Original Message-----
> From:   Procek, Brett [SMTP:[EMAIL PROTECTED]]
> Sent:   Wednesday, May 23, 2001 10:52 AM
> To:     [EMAIL PROTECTED]
> Subject:        RE: How to assign contents of a tag to a Java-variable?
>
> I've been very happy about this book.  I'm usually looking for
> well-explained concepts and code snippets, so spelling errors aren't a
> big problem for me.
>
> Professional JSP
> WROX
> ISBN 1-861003-62-5
>
> Brett
>
> -----Original Message-----
> From: Dave Newton [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 22, 2001 1:00 PM
> To: [EMAIL PROTECTED]
> Subject: RE: How to assign contents of a tag to a Java-variable?
>
> Stefan Seidel said:
> > could You tell us the the publisher and the ISBN# of Your book
> > recomendation? (_Professional JSP_)
>
> The following showed up during a 30-second amazon search spree:
> Wrox Press Inc; ISBN: 1861004958
>
> I am generally VERY wary of Wrox books due to huge wads of
> typos, code that just plain wouldn't work, poor editing, etc.
>
> I've been much happier with _Core Servlets and JavaServer Pages_
> by Marty Hall, Prentice Hall, ISBN 0-13-089340-4 for the Amazonally-
> challenged ;) combined with the online JavaDocs for the J2EE platform.
>
> Dave
begin:vcard 
n:;
x-mozilla-html:FALSE
org:<BR><IMG SRC="http://www.irista.com/logo/irista.gif";><BR><BR><FONT Color=#000080><FONT SIZE=2><B>Bringing Vision to Your Supply Chain
adr:;;;;;;
version:2.1
end:vcard

Reply via email to