Re: Problems with Taglibs



gwoodhouse@xxxxxxxxx wrote:
In response to GArlington:

From my understanding of the logic behind include statements, they are
preprocessed to create the whole "page" from its component includes,
which is then interpretted later in the proccess.

We use this default include on each of our (main) pages to save us
having to include the doctype and taglib directives all the time. As i
said, this same code is used by many other people in the company and
they have no problems.

This is a misapprehension of the nature of the DOCTYPE directive. Have you ever done "view source" on generated HTML? The DOCTYPE is not there, is it?

That's why your include doesn't let you include DOCTYPE - DOCTYPE just isn't part of the page in that sense.

<%@include> doensn't include the text of the included JSP in an HTMLish way - it includes it prior to compilation of the JSP. Thus you get two <DOCTYPE> directives, I guess, which causes the emission of prolog information twice, which generates the error message you saw.

I might have reasoned this one wrong in some of the details, but the fact remains that including DOCTYPE doesn't work.

--
Lew
.