tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "K.C. Baltz" <kc.ba...@lollimail.com>
Subject Re: Pass scrape taglib to a method (string)
Date Thu, 04 Sep 2003 16:09:32 GMT
<%  %>   - Denotes a "scriptlet", java code that is directly inserted 
into a generated Servlet

The tags you are trying to use are called "custom tags", and they can't 
be used inside scriptlets any more than  you could do:
<%
    <html>
%>

Whatever appears within a scriptlet must be Java code.   

If you can, try to avoid mixing custom tags and scriptlets.  Although 
it's possible to do this, it can be very confusing for new users of JSP 
and tags.

K.C.

Karen D. Wiens wrote:

>Thank you for responding.  I've tried this and I'm still getting a
>syntax error.
>
>I replaced:
>  
>
>><% // snag text and stick it into 'teststring' 
>>
>>String teststring = pageContext.getAttribute( "<scrp:result
>>scrape="pj3"/>" );
>>    
>>
>
>With:
><% // snag text and stick it into 'teststring' 
><c:set var="teststring"><scrp:result scrape="pj3"/></c:set>;
>%>
>
>And got the following error message:
>(Thanks again for any help you can give)
>Karen
>*** Syntax: Unexpected symbol ignored
>
>
>
>    88. 
>           ^-^
>
>*** Syntax: "AssignmentOperator AssignmentExpression" inserted to
>complete Assignment
>
>
>
>    88. 
>           ^-^
>
>*** Syntax: ";" inserted to complete ExpressionStatement
>
>
>
>    88. 
>                               <>
>
>*** Syntax: misplaced construct(s)
>
>
>
>    88. 
>                                     <>
>
>*** Syntax: ; expected instead of this token
>
>
>
>    88. 
>                                                          <--->
>
>*** Syntax: Unexpected symbols ignored
>
>
>-----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!
>  
>


Mime
View raw message