how to dynamically decide to show the jspf's
Hi all,
I have an issue of renderring jspf's dynamically in an jspf. I have three JSPF's and the order is dependent on backend, so the order can be of any sort . I need to use the string in the name property of <jsp:include name = str ></jsp:include>, here the str is determined during runtime. The page is not rendered properly, or it says the name property should be quoted.
Please help me on this issue.
# 1
<jsp:include page="{relativeURL | <%= expression %>}"
flush="true| false" />
Plz, read carefully this http://java.sun.com/products/jsp/syntax/1.2/syntaxref1214.html
Hope That Helps
# 2
Note also, that the jspf extension doesn't render the JSP by default.
jspf fragments are meant to be only fragments of a page, included by the include directive at compile time.
In this case as you want a runtime decision, you have to use <jsp:include> but then you also have to give the files you load .jsp extensions rather than .jspf.
Cheers,
evnafets