D
Duncan
Hi
I have a custom tag, it's called fragment
I have a number of different types of fragments all of which are text
(plain, image url, html) apart from one which is a jsp type
The jsp fragment actually contains the name of the jsp (e.g
dateTime.jsp)
If I have this code in a jsp
<img src="<fragment:fragment placeHolder="headerRight" />"
and the headerRight alias causes the text 'images/banner.jpg' to be
loaded then the banner image is displayed.
if I have the following jsp called dateTime.jsp
<%
Date d = new Date(System.currentTimeMillis());
out.println(d);
%>
then <jsp:include page="dateTime.jsp"/>
works fine (as expected)
What I actually want to be able to do is something like this
<jsp:include page="<fragment:fragment placeHolder="dtFrag"/>"/>
where the placeHolder dtFrag causes the text dateTime.jsp to be loaded
(or would/could/should do if I could get it to work)
This doesn't compile and nothing I do will work.
I think it may have something to do with the fact that some things are
compiled at runtime and others at compile time but as I'm no JSP
expert I can't be sure
Have I completely lost the plot here ?
Is it possible to cause a jsp to be compiled on the fly from withing a
custom tag.?
Do I have any idea what it is I'm trying to do ?
Should I give up and get a job as a worm farmer ?
Cheers
Duncan
I have a custom tag, it's called fragment
I have a number of different types of fragments all of which are text
(plain, image url, html) apart from one which is a jsp type
The jsp fragment actually contains the name of the jsp (e.g
dateTime.jsp)
If I have this code in a jsp
<img src="<fragment:fragment placeHolder="headerRight" />"
and the headerRight alias causes the text 'images/banner.jpg' to be
loaded then the banner image is displayed.
if I have the following jsp called dateTime.jsp
<%
Date d = new Date(System.currentTimeMillis());
out.println(d);
%>
then <jsp:include page="dateTime.jsp"/>
works fine (as expected)
What I actually want to be able to do is something like this
<jsp:include page="<fragment:fragment placeHolder="dtFrag"/>"/>
where the placeHolder dtFrag causes the text dateTime.jsp to be loaded
(or would/could/should do if I could get it to work)
This doesn't compile and nothing I do will work.
I think it may have something to do with the fact that some things are
compiled at runtime and others at compile time but as I'm no JSP
expert I can't be sure
Have I completely lost the plot here ?
Is it possible to cause a jsp to be compiled on the fly from withing a
custom tag.?
Do I have any idea what it is I'm trying to do ?
Should I give up and get a job as a worm farmer ?
Cheers
Duncan