how to use variable in page attribute of jsp include tag?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • user7777
    New Member
    • Sep 2014
    • 6

    #1

    how to use variable in page attribute of jsp include tag?

    how to use variable in page attribute of jsp include tag?
    Code:
    <jsp:include  page="/WEB-INF/fd_jsp/layouts/basketcontent.jsp" />
    I want to insert a variable passed as parameter in page attribute .Something like

    Code:
    <jsp:include  page="/WEB-INF/${templateName}/layouts/basketcontent.jsp" />
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    You can use
    Code:
    <% String s = "templateName"; %>
    <jsp:include  page='/WEB-INF/<%=s%>/layouts/basketcontent.jsp' />

    Comment

    Working...