[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-developers] Installing Tomcat 4x on a Linux machine
- Subject: RE: [cobalt-developers] Installing Tomcat 4x on a Linux machine
- From: "Ben Ramsey" <ben@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon Aug 5 08:53:01 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
The instructions below worked perfectly. I think the only problem in the
web.xml file was that it wasn't pointing to the correct DOCTYPE for the
version of Tomcat I am using. I changed it to:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
and all works fine, now! Please note that the location of the 2.3 DTD has
changed from what is listed below.
However, I'm still having a problem, and I think this may deal with some
configuration issues (or programming issues). I am able to load normally
JSP pages that contain Java code fragments, etc., but when I want to use JSP
tags, it balks on me with this error:
Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error
----------------------------------------------------------------------------
----
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error on line 1 of document : The root
element is required in a well-formed document. Nested exception: The root
element is required in a well-formed document.
Now, I know what this means: it's trying to force me to create JSP pages
containing tags as well-formed XML pages. This is all fine and dandy, but
now I have to completely recode all my pages.
Is there a setting that I can modify to make Tomcat more lenient on this?
Thanks.
Ben Ramsey
Technical Director
EUREKA! Interactive, Inc.
770-642-0390
www.eureka-interactive.com
-----Original Message-----
From: cobalt-developers-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx]On Behalf Of William L.
Thomson Jr.
Sent: Friday, August 02, 2002 9:10 PM
To: Cobalt Developers Group
Subject: RE: [cobalt-developers] Installing Tomcat 4x on a Linux machine
Ok,
Thanks to
Mr. Michele Neylon
Blacknight Solutions - affordable linux hosting
http://www.blacknightsolutions.com/
For giving me access to his machine.
The problem was in using the default web.xml file in the sites.
Do not use the one that comes with the Cobalt jdk kit, or any example
web.xml as that is what it is and example. Not a working one and it will
cause problems.
Start with a web.xml file containing the following.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
</web-app>
You can change the DTD/webapp type to 2.3 or 2_3 if needed depending on
the version of servlets and etc that you need.
Also be very careful when adding entries to the web.xml file. As the xml
parser in Tomcat 4.x is very picky on the order. I found that out the
hard way.
So add things one at a time and adhere to the format or recommended
format. Also put complex servlets requiring more params and etc toward
the bottom of the web.xml file. If complex ones come before none complex
ones the compiler will look for more params in each servlet to follow
and will cause the parser to fail when it does not find them.
That is base on my experiences so far. Others may have experienced
things differently or had different experiences.
Hope that helps others as it did get Michele up and running.
--
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone 707.766.9509
Fax 707.766.8989
http://www.obsidian-studios.com