spacer
Web Development Tutorials JAVA Tutorials
 Developer Newsletter

Tutorials
AJAX
ASP
CGI & Perl
CSS
Flash
HTML
Illustrator
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML
Miscellaneous


Scripts Directory
AJAX Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Web Hosting Directory
ASP.NET
Budget
Dedicated Servers
Ecommerce
Linux
Resellers
Shared
Small Business
Windows

Developer Manuals
Learn HTML
Learn PHP
Learn CSS
Learn AJAX
Learn JavaScript
Learn Pear
Free White Papers

Developer Resources
Developer Tools
Developer Content
Survey Software
Dedicated Servers




Client and server-side templating with Velocity

By Sing Li
2004-06-13


Client and server-side templating with Velocity

The manipulation and transformation of textual data in standard presentation or exchange formats such as HTML and XML is a frequent and often tedious activity in which every software developer engages. A templating engine can facilitate this process by maintaining the static portion of the output in templates, while dynamically generating and positioning the changing portions. Velocity is a highly functional, open source templating engine that you can easily integrate into either client-side or server-side applications.

For server-side applications, when integrated with Web tier containers compatible with Servlet 2.3+, Velocity provides a viable alternative to JSP technology that can enforce a clean separation of presentation logic from application business logic. In fact, the templating language supported by Velocity is simple enough and the resulting templates are sufficiently uncluttered that Web site designers and stylists can learn and maintain these templates.

In this article, we will examine Velocity's simple templating language, create some templates, and apply them in a standalone client application. We'll then integrate the template engine into the Struts MVC framework as a view component.

Tutorial Pages:
» Client and server-side templating with Velocity
» Basic template engine operation
» Velocity contexts
» Velocity as a standalone parser
» Velocity vs. JSP technology on the server
» Deploying Velocity with Tomcat 5
» Interoperating with the Struts framework
» Conclusions
» Resources


First published by IBM developerWorks


 | Bookmark Print |   Write For Us
Related Tutorials:
» All about JAXP, Part 1
» Make Database Queries Without the Database
» Load List Values for Improved Efficiency
» 2 Ways To Implement Session Tracking
» A Simple Way to Read an XML File in Java
» Develop Aspect-Oriented Java Applications with Eclipse and AJDT



About the NetVisits, Inc Network | Write For Us | Advertise
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: