File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Error When starting Tomcat server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Error When starting Tomcat server" Watch "Error When starting Tomcat server" New topic

Error When starting Tomcat server

Angelo Watson
Ranch Hand

Joined: Oct 27, 2002
Posts: 39
Im writing a simple Hello tag (custom tag) I wrote my jsp, hello.tld, and the class file.
My web.xml looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">

<description>Tag extensions examples</description>
<!-- Tag Library Descriptor -->

My hello.tld source is this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun MicroSystems, Inc.//DTD JSP Tag Library 1.1//EN"
<info>Simple example library.</info>
<info>Simple example</info>
This hello.tld is place under WEB-INF\tlds
When ever I start the server it gives me a bunch of errors. Please help
boyte silverio

Joined: Aug 28, 2002
Posts: 4
You probably made some typo errors:
1. At your header, '...Sun MicroSystems...' should be '...Sun Microsystems...' (note lower case 's' in 'Microsystems')
2. <shorname> should be <shortname> (note: you didn't type 't')
I placed these corrections and tomcat run fine.
I assume you're using tomcat 4. I noticed you're using version DTD Web Application 2.3 in your web.xml and DTD JSP Tag Library 1.1 in your hello.tld. You will be encountering less headaches than I had if you start using DTD JSP Tag Library 1.2 in your .tld. Aside from additional features, note the difference in tag naming between versions 1.1 and 1.2 e.g. <tlibversion> and <jspversion> in 1.1 versus <tlib-version> and <jsp-version> for 1.2. The 1.2 naming is more consistent with the tag namings in web.xml (which uses DTD Web App...2.3) and will probably be what would be followed in future versions e.g. 1.3(?).
Sample heading for 1.2 version is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
note difference in the "http.. " line. In version 1.1 it is "" and there's no '.../j2ee/...' in 1.2.
why the makers change their minds on these matters is probably for a good reason.... ... .. . and I hope they also clarify it to us, greens, if we don't find out first .
Angelo Watson
Ranch Hand

Joined: Oct 27, 2002
Posts: 39
Thank You so much.
I agree. Here's the link:
subject: Error When starting Tomcat server
It's not a secret anymore!