Forums Register Login
include duplicate issue
General question about how <@include ... %> and <jsp:include ... /> work.

if say for example I had a header defined as


and then in my main page

[@inclue or jsp:include]

<p>some body text here</p>


won't that duplicate the html? since, in the case of @include its akin to a C MACRO or a straight up copy-and-paste?

is the correct way to do this to strip the offending tags (the HTML and BODY in my example) or does jsp:include do some magic to strip out the unwanted ones?
Why are they there in the first place? Why does the header have html tags and the body too? It's your reponsibility to make sure that the HTML is well formed.

And no, there is no magic to the include mechanism. To all JSP mechanisms HTML is just template text with no semantics applied.
thanks, makes sense
Perhaps this article might be of interest.

This thread has been viewed 1089 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 18, 2018 10:54:30.