• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Error When starting Tomcat server

Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" "http://java.sun.com/dtd/web-app_2_3.dtd">;

<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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 "http://java.sun.com..."; 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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You so much.
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic