pushBody() and popBody() problems in BodyTag
fmt:bundle basename=test c:out value=test1 / % if (true) return; % /fmt:bundle In above case, I want to print out test1, but not print out Is it possible to print out string between fmt:bundle and return ? Thanks in advance Mikio Kishi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:if and boolean value
Thanks for the suggestion, Tim. I actually did buy Shawn's book (in PDF form), I just haven't quite gotten familiar with it to remember all the resources that are there. Still used to hard-copy, I guess :-) . -- john Tim Kettering wrote: John, Download the PDF at this URL and keep it around: http://www.manning.com/bayern/appendixA.pdf I've found it quite useful in terms of referencing JSTL tags, and for finding examples of how such tags are written. I certainly wish it had a bit more examples, but I suppose thats why you buy the book, as Bayern would like. :) -tim On Thursday, February 06, 2003, at 11:51AM, John C Cartwright [EMAIL PROTECTED] wrote: That works great, thanks to both Tim and Pierre. One follow up question though - is there a c:else tag to go with the c:if? Thanks again! -- john Timothy Kettering wrote: Yeah, that occured to me after I sent off the email and was sitting on the couch watching Law Order on TNT. Somehow I just couldn't be bothered enough to go back to the computer and follow up on it. :) Anyway, more ways to skin the proverbial cat... -tim On Wednesday, February 5, 2003, at 09:37 PM, Pierre Delisle wrote: Try the following: c:if test=${mapservice.running} [What Timothy suggested would also work, but there is no need to test against true, since you already have a boolean expression for your test.] -- Pierre Timothy Kettering wrote: offhand, id say you should be doing this. (enclose the entire evaluation in the curly braces) c:if test=${mapservice.running == true} On Wednesday, February 5, 2003, at 08:23 PM, John C Cartwright wrote: Hello All, I have a isRunning() method in my bean that returns a boolean. I'm try to test against that value with something like the following: c:if test=${mapservice.running} == true img src=../images/TransGear.gif width=20 height=20 /c:if The problem is that even though the bean's getter method is properly returning the true value (I can print it into the HTML page), the above conditional always fails. Can someone point out what I'm doing wrong? JSTL v.1.2, core library. Thanks! -- john = John Cartwright Associate Scientist Geospatial Data Services Group CIRES, National Geophysical Data Center/NOAA (303) 497-6284 [EMAIL PROTECTED] = -- = John Cartwright Associate Scientist Geospatial Data Services Group CIRES, National Geophysical Data Center/NOAA (303) 497-6284 [EMAIL PROTECTED] = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- = John Cartwright Associate Scientist Geospatial Data Services Group CIRES, National Geophysical Data Center/NOAA (303) 497-6284 [EMAIL PROTECTED] = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Counter using Struts Taglibs
Hi All, How can I define counters using Struts EL tag libraries for printing purposes in JSP pages Here is an example table border=1 c:forEach var=transid items=${trans.transactions} tr tdc:out value=${transid.acctno}//td tdc:out value=${transid.testcode}//td if($transid.testcode==ts ) tscount=tscount+1; tdc:out value=${transid.srcfac}//td tdc:out value=${transid.dateofservice}//td tdc:out value=${transid.htkey}//td /tr /c:forEach /table In the above code i would like to print the total and number of iterations the for loop performed. I would also like to do some condition to inside the for loop to print another specific counter like eg:-- if($transid.testcode==ts ) tscount=tscount+1; I am novice and have recently started using these tag libraries.Is there a link or web site which has tutorials on how to use the tag libraries. Any help appreciated thanks Vinay
Using Standard Tag Library to Display a Request Attribute
I'm struggling with displaying a request attribute with the Standard tag library. I would like to display the javax.servlet.error.message request attribute, but nothing is displaying. The following format doesn't display anything: c:out value=${requestScope.javax.servlet.error.message} / However, I can see an error message if I use this: c:out value=${pageContext.exception.message}/ Is there a trick to displaying request attributes with JSTL? Is the expression language interpreting the periods in the attribute name? Regards, Garrel Renick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Counter using Struts Taglibs
On Thu, 6 Feb 2003, Vinay wrote: Hi All, How can I define counters using Struts EL tag libraries for printing purposes in JSP pages It looks like you're really asking about JSTL tags, not Struts. You can use c:set to increment a variable, as in c:set var=counter scope=session value=${counter + 1} / I am novice and have recently started using these tag libraries.Is there a link or web site which has tutorials on how to use the tag libraries. The JSTL specification is available at http://java.sun.com/products/jstl. If that's too technical for you at the moment, there are also several books on JSTL; more info on mine is available at the URL below. -- Shawn Bayern JSTL in Action http://www.manning.com/bayern - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Standard Tag Library to Display a Request Attribute
On Thu, 6 Feb 2003, Renick, Garrel wrote: c:out value=${requestScope.javax.servlet.error.message} / Is there a trick to displaying request attributes with JSTL? Is the expression language interpreting the periods in the attribute name? Yes, it is. To avoid this, you can use expressions like the following: c:out value=${requestScope['javax.servlet.error.message']} / The [] syntax works wherever . works, but it lets you avoid problems when the property name itself contains a period. -- Shawn Bayern JSTL in Action http://www.manning.com/bayern - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
looping/ iterating over a collection ina a collection
for some reason i am unable to loop over a collection in a coolection for example: i have a class with a field called basket which is a collection of Items which contains a field called contents. for some reason i am unable to access the the contents in Item with the follwing code: c:out value=${sessionScope.Cart.basket[0].content[0].name} / or c:forEach items=${sessionScope.Cart.basket} var=i c:forEach items=${sessionScope.Cart.basket[i].contents} var=x c:out value=${x.name}/ /c:forEach /c:forEach i hope this make sense but the bottomline is iam trying to access a collection in a collection and i cant seem to be able to do it thank you Louis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]