![]() |
|
Version: 0.27 - Last update: 2004-05-30 | Home Page - SourceForge Project Page - Contact |
Jodd Overview News Download License References Development Using Jodd Javadoc JUnit report Community Contribute Report a bug More reading Milestone 0.30 ![]() ![]() |
JSP templatesThe common thing with the JSP is having parts of pages that looks more-less the same on many pages. Jodd JSP templates provides solution for reusing JSP. Templates may be used either as macros or as real templates. Macros usage is similar to usage of m4 unix command. Templates usage is just another way of organizing the JSP source code. All templates and macros are stored in JSP, and all changes will be visible immediately, without restarting the server.Here is the example of using templates as macros.
Above example inserts (i.e. imports) the specified JSP page (123.jsp) and defines 2 parameters that are used on the imported page. In this example imported page logically serves as a JSP macro that has two parameters. Here is an example how templates may be used.
Template is defined in the external file and may looks like this:
More examples can be found in the distribution archive. |