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. Advertising

  2. Grzegorz Stasica

    SPG Guest

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

    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
    "Grzegorz Stasica" <> wrote in message
    news:c0fheb$jrm$...
    > 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.
    >
    >
    >
    SPG, Feb 12, 2004
    #2
    1. Advertising

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

    Grzegorz Stasica wrote:

    > ---------------------------------------
    > |header the same for every page |
    > |--------------------------------------
    > | |
    > |menu | main contents
    > | |
    > ---------------------------------------
    > |footer the same for ever page |
    > ----------------------------------------


    Then have a look at Struts-Tiles Implementation.

    Regards,

    Tobias
    --
    <http://www.schierge.de/tobias/>
    Tobias Schierge, Feb 12, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Newsgroup - Ann
    Replies:
    4
    Views:
    692
    lilburne
    Nov 2, 2003
  2. Roger23
    Replies:
    2
    Views:
    986
    Roger23
    Oct 12, 2006
  3. Raman
    Replies:
    6
    Views:
    4,697
    santosh
    Aug 3, 2007
  4. mlt
    Replies:
    2
    Views:
    820
    Jean-Marc Bourguet
    Jan 31, 2009
  5. Jef Driesen
    Replies:
    14
    Views:
    595
    Jef Driesen
    Jan 10, 2010
Loading...

Share This Page