Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

taglibs error  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I just started working on taglibs. As usual i started out with a set of errors. I am using
Tomcat 4.1 over Windows 98
I am not sure if i have the directory structure correct.
I created a sample directory under webapps and my application is called sample. I have the files as following
| |--/classes
| | |-------HelloTag.class
| |--web.xml
| |--HelloTag.tld
<%@ taglib uri="http://localhost:8080/sample" prefix="examples" %>
<title>First custom tag</title>
This is static output.
<p />
This is static output again.
Web.xml is as follows
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
Welcome to Sample

<?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>
I had a error free compile on the file HelloTag.class and the class name is HelloName.
The servlet container throws an Null Pointer Exception.
Any Pointers to why this occurs?
Thanks In Advance.
Prashanth Kalvala
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can immediately see two problems:
1) The WEB-INF directory MUST be capitalised.
2) The taglib URI that you have used on your JSP does not match that declared in your web.xml
Try and resolve these issues and let us know if there are more problems
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!