You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Karen D. Wiens" <ka...@polygon.net> on 2003/10/16 20:20:44 UTC
RE: Pass scrape taglib to a method (revisited)
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
RE: Pass scrape taglib to a method (revisited)
Posted by "Karen D. Wiens" <ka...@polygon.net>.
That works perfectly!! Thank you so much!!
-----Original Message-----
From: Kris Schneider [mailto:kris@dotech.com]
Sent: Thursday, October 16, 2003 12:40 PM
To: Tag Libraries Users List
Subject: RE: Pass scrape taglib to a method (revisited)
Try:
<c:set var="teststring"><scrp:result scrape="pj4"/></c:set>
<jsp:useBean id="teststring" type="java.lang.String"/>
<%= teststring %>
Quoting "Karen D. Wiens" <ka...@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 <ma...@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
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
RE: Pass scrape taglib to a method (revisited)
Posted by Kris Schneider <kr...@dotech.com>.
Try:
<c:set var="teststring"><scrp:result scrape="pj4"/></c:set>
<jsp:useBean id="teststring" type="java.lang.String"/>
<%= teststring %>
Quoting "Karen D. Wiens" <ka...@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 <ma...@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