views:

83

answers:

1

I have developed a simple struts application which retrieves and manipulates customer data from the database. Now I want to include an image at the top of all the pages. I know tiles is the best way to do it. Since I'm a newbie can anyone help me to include an image in my existing project using tiles.

Thanks in advance

+1  A: 

Hi,

You can find a well illustrated example here : First Struts Tiles Tutorial

Basically, you will have to :

  • define a layout (template) of your pages using tiles tags (tiles:insert)
  • create tiles definitions telling which jsps (or static ressources) go into the tiles:insert you defined in the layout
  • adapt your struts mapping to redirect to named tiles definitions instead of jsps directly
WiseTechi