tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject RE: Pass scrape taglib to a method (revisited)
Date Thu, 16 Oct 2003 18:39:38 GMT
Try:

<c:set var="teststring"><scrp:result scrape="pj4"/></c:set>
<jsp:useBean id="teststring" type="java.lang.String"/>
<%= teststring %>

Quoting "Karen D. Wiens" <karen@polygon.net>:

> Hello all, 
> I understand this but the problem is that I need to use the output
> within a scriplet.  Is that possible?
> 
> <c:set var="teststring"><scrp:result scrape="pj4"/></c:set>
>   <c:out value="${teststring}" />
> Will output the string but I can't use it within a scriplet
> 
> If I call the variable teststring in a scriplet, like
> <%= teststring %>
>  I get: No entity named "teststring" was found in this environment
> 
> I tried changing the scope but that didn't help.  I need to pass this
> string to a method that someone else wrote....
> 
> I'm just getting started with these taglibs and appreciate any help that
> anyone can give.
> Thank you,
> Karen
> 
> -----Original Message-----
> From: Hassan Schroeder [mailto:hassan@webtuitive.com] 
> Sent: Friday, August 29, 2003 5:00 PM
> To: Tag Libraries Users List
> Subject: Re: Pass scrape taglib to a method (string)
> 
> 
> Karen D. Wiens wrote:
> 
> > How can I pass the value of the scrape taglib to a method?  It seems
> to
> > me that it should be something like:
> > 
> > <% // snag text and stick it into 'teststring' 
> > 
> > String teststring = pageContext.getAttribute( "<scrp:result
> > scrape="pj3"/>" );
> > 
> > %>
> 
> One approach:
> 
>   <c:set var="teststring"><scrp:result scrape="pj3"/></c:set>
> 
> HTH!
> -- 
> Hassan Schroeder ----------------------------- hassan@webtuitive.com
> Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
> 
>                            dream.  code.

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message