Discussions

Web tier: servlets, JSP, Web frameworks: Javascript and Tiles

  1. Javascript and Tiles (1 messages)

    Hi
    I am going to use the tiles framework. I am not sure how
    i can insert custom javascript into each jsp page...even though they may use the same layout...
    i.e...though the use the same layout page...how can i change
    the included javascript...does tiles insert tag be used
    to insert a javascript file? or what exactly is recommended?

    thanks in advance
    -ram
  2. Javascript and Tiles[ Go to top ]

    hi,

    Let say you are using layout. Nothing stops you putting in javascript
    inside header.jsp, footer.jsp, menu.jsp, helloBody.jsp.

    http://www.lifl.fr/~dumoulin/tiles/doc/tutorial.html

    Snippet from the above tutorial

    <tiles:insert page="/basic/myLayout.jsp" flush="true">

      <tiles:put name="title" value="My first page" />

      <tiles:put name="header" value="/tutorial/common/header.jsp" />

      <tiles:put name="footer" value="/tutorial/common/footer.jsp" />

      <tiles:put name="menu" value="/tutorial/basic/menu.jsp" />

      <tiles:put name="body" value="/tutorial/basic/helloBody.jsp" />

    </tiles:insert>

    Bhagvan K
    http://www.architectcorner.com