jakarta-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Stevens <...@latchkey.com>
Subject FW: Veltag JSP Taglib
Date Tue, 14 Aug 2001 02:52:28 GMT
I love it.

-jon

------ Forwarded Message
From: "Geir Magnusson Jr." <geirm@optonline.net>
Reply-To: velocity-user@jakarta.apache.org
Date: Mon, 13 Aug 2001 22:54:33 -0400
To: velocity-user <velocity-user@jakarta.apache.org>
Subject: Veltag JSP Taglib

Tonight I committed into the contrib section of CVS a mini-project
called 'Veltag' which is a JSP taglib that allows you to use VTL within
a JSP page.  I also added some documentation to the Velocity site under
'Tools', titled 'IT Manager wants JSP?'.  The documentation isn't
complete, but I have been playing with this for quite some time, and I
didn't want to put off committing it any longer.

This taglib allows you to put VTL right in your JSP pages :

<%@ taglib uri="/WEB-INF/veltag.tld" prefix="vel" %>

<html>
<head>
  <title> Velocity! </title>
</head>

<jsp:useBean id="mybean"  class="GeirBean" />

<body>
    <vel:velocity strictaccess="true">

         #set($mybean = $scopetool.getPageScope("mybean"))

         #if(true)
            this is true!
         #end

         #foreach($item in $mybean.array)
             $item <br>
         #end
     </vel:velocity>
</body>
</html>

JSP experts : if there are any problems with my JSP or taglib
nomenclature or setup, I would love to know about it.  My JSP is kinda
weak :)

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb

------ End of Forwarded Message


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


Mime
View raw message