how to build web application and avoid the same page sections duplication(header..)

Discussion in 'Java' started by Grzegorz Stasica, Feb 12, 2004.

  1. Hi,

    I'm building a web app based on struts framework and basicaly I'd like
    to receive something like this.
    ---------------------------------------
    |header the same for every page |
    |--------------------------------------
    | |
    |menu | main contents
    | |
    ---------------------------------------
    |footer the same for ever page |
    ----------------------------------------

    because header,footer and menu sections are the same for every page I'd
    like to habe some kind of phplib template funcionality. I mean these
    data should be taken from files for example header.htm etc..
    I saw something like include in Struts but can't remember the context
    where it was used.

    Could somebody share with me ones knowledge regarding this issue.
     
    Grzegorz Stasica, Feb 12, 2004
    #1
    1. Advertisements

  2. Grzegorz Stasica

    SPG Guest

    Hi,

    In struts you can use templates (or tags).
    Create your own tag library containing your header and footer.
    Then in each JSP, simply include the tag in the correct places.

    There are some good examples in the struts documentations..

    Steve
     
    SPG, Feb 12, 2004
    #2
    1. Advertisements

  3. Then have a look at Struts-Tiles Implementation.

    Regards,

    Tobias
     
    Tobias Schierge, Feb 12, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.