java - nested templates using velocity -


i have small java web project should create few web pages.

all pages should have same boilerplate (css, javascript, etc.) indiviual content (i.e. content of main div.)

what usual way of implementing kind of setup in velocity?

currently way see rendering boilerplate template uses #parse include actual page given context parameter.

is there easier way?

i come sinatra render actual page , implicitly add boilerplate around it. know of similar templating framework in java?

in sinatra example do:

get '/'   haml :index, :layout => :master end 

to render index page in master layout. (or leaving out layout part in default layout.)

i'd recommend use velocitylayoutservlet velocitytools project: http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/view/velocitylayoutservlet.html


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -