Hi:

I have a template,and one of my page(home.jsp) extend this template,this is
the definition file:

<tiles-definitions>

    <definition name="/commonPage" template="/jsp/common/template.jsp">

        <put-attribute name="header" value="/jsp/common/defaultHeader.jsp" />
        <put-attribute name="menu" value="/jsp/common/defaultMenu.jsp" />
        <put-attribute name="footer" value="/jsp/common/defaultFooter.jsp" />

    </definition>


    <definition name="/home" extends="/commonPage">
        <put-attribute name="body" value="/jsp/home_body.jsp" />
    </definition>

    <definition name="/user" extends="/commonPage">
        <put-attribute name="body" value="/jsp/user_body.jsp" />
    </definition>

</tiles-definitions>

home.jsp:

<%@ taglib uri="http://tiles.apache.org/tags-tiles"; prefix="tiles"%>
<tiles:insertDefinition name="/home" />



And now I need some javascripts in the home.jsp,however I do not know where
to add it.

I can add it in the home_body.jsp,but I prefer to add it in a external
file,so where to define it?

I mean where to write this  <script ... src=xx.js /> ?

Thanks.

Reply via email to