Section 2 of http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html says to add a slug of XML between a </Context> tag and a </Host> tag. Tomcat's conf/server.xml (at least version 5.0.28) does not have a </Context> tag. I had some success with adding a <DefaultContext> tag and putting the slug in that, but I'm not sure if that's the right thing to do.
The tag is optional and may be added in server.xml or other places. Read the rest of the docs, especially the ones on Context configuration.
Item 2 of a seemingly step-by-step HOWTO says: "Add this in between the </Context> tag of the examples context and the </Host> tag closing the localhost definition." This step is *impossible* to follow as is because the server.xml does not contain the string "</Context>". I personally think that examples provided in documentation should work verbatim and not require various unspecified amendments informed by further reading, but if this is not in fact the policy of the documentation team then may I suggest you add some text to this effect? e.g. "These example are approximate only; if these examples don't work for you, please read the document in its entirety, including all linked pages."
I've added to the JNDI DataSources HowTo: - An explicit paragraph at the top of the page saying you shouldn't even read this page if you don't understand the context and host configuration pages, with links to these pages. - An explicit notice in the section you mention, addressing what to do if there's no context tag in server.xml and the reader couldn't simply copy and paste the one repeated in the doc.