Win a copy of Spark in Action this week in the Open Source Projects 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Simple Tag Libraries (strange problems indeed!)

Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been trying to get custom tag libs to work, and here's the short of what I have tried...
JDK1.3.x & Tomcat3.3.1
JDK1.4.x & Tomcat4.0.4
jBuilder6 & JDK1.3.x & Tomcat 3.2.3
(nearing an exercise in futility: all I want to do is reduce the spaghetti in my servlets and create some clean JSPs...)
All application containers give a variation of the same resulting error: (from tomcat4.x)
org.apache.jasper.compiler.CompileException: /HelloUser1.jsp(7,2) Unable to load class HelloUser

Which leads me to believe that I have all parts working but a problem with the classes being found. (btw: I can serve other JSP / beans from this directory)
it's funny, but everything looks okay?!!?
I'll take any information that you can offer.
JDK1.4 & Tomcat4.0.4
directory structure:


From this simple layout, I have the following for each piece:



Posts: 67414
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if this is your problem or not, but I've read a number of threads here which describe problems with classes defined in the default package.
You might want to try putting your tag handler class in a non-default package (which is good practice in any case) and see if that clears things up.
sharp shooter, and author
Posts: 1913
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep ... I second that suggestion.
Dane Frazier
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
Many thanks.
Here's what I did to resolve:
Upgraded to JDK1.4.x and Tomcat4.0.4
Configured TC to run root/docroot where I wanted. Tested TC configuration with pages / classes known to work in my prod environment.
Re-compiled class with package;
re-configured TLD to point to new class
Changed tag-name of class in TLD to "mixed" case letters.
I see how the interactions occur now, and am off and running -
Thanks for the help.
Won't you be my neighbor? - Fred Rogers. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic