Re: Problems with Taglibs
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 09:32:50 -0500
"gwoodho...@xxxxxxxxx" wrote:
I'm getting this error:
javax.servlet.ServletException: javax.servlet.jsp.JspException:
Content is not allowed in prolog.
I have: "WEB-INF\lib\standard-1.1.2-patched.jar" in my buildpath.
The part of the code its having trouble with is in my very first page
with this:
<%@ include file="/WEB-INF/jsp/common/taglibs.jsp" %>
which links to taglibs.jsp:
GArlington wrote:
I think that the following line(s) may be causing your problem:
<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
You may be trying to reset the page headers after some output is
already written, it does not usually work...
I do not understand how those lines reset page headers after output is already written. How is it that they do that?
Just about every JSP I've written for the last seven years begins with
<%@page contentType="text/html" pageEncoding="UTF-8"%>(quoted from my current project verbatim)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Not a one has the error the OP described.
--
Lew
.
- Follow-Ups:
- Re: Problems with Taglibs
- From: gwoodhouse@xxxxxxxxx
- Re: Problems with Taglibs
- References:
- Problems with Taglibs
- From: gwoodhouse@xxxxxxxxx
- Re: Problems with Taglibs
- From: GArlington
- Problems with Taglibs
- Prev by Date: The complete Java 1.5 syntax
- Next by Date: How can you make a SAX-like parser ignore char entities all together ...
- Previous by thread: Re: Problems with Taglibs
- Next by thread: Re: Problems with Taglibs
- Index(es):
Relevant Pages
|