This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes Unable to load tag handler class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Unable to load tag handler class "com.midnightcookies.taghandlers.LinksHandler" " Watch "Unable to load tag handler class "com.midnightcookies.taghandlers.LinksHandler" " New topic
Author

Unable to load tag handler class "com.midnightcookies.taghandlers.LinksHandler"

Mark Addinall
Greenhorn

Joined: Feb 11, 2009
Posts: 3
G'Day from Brisbane,
although not a newbie as such, I have been out of the Java world for eight years or so. Given a new year I thought I'd get back in touch with a few new environments. So NetBeans 6.5, GlassFish V2 and Java SDK of course. And I picked out some beginners tutorials. Got through the first one. It had errors, but they were easy to pick and correct. I am stumped on this error on the second tutorial, as I AM a newbie at this technology!

http://www.netbeans.org/kb/docs/web/tutorial-webapps.html
That is the tutorial
NetBeans IDE Tutorial for Web Applications
Welcome to the NetBeans IDE 6.5 tutorial for web applications.


I foolowed the tutorial step by step and got errors. Figuring I had a case of dyslexic fingers, I did the toot again using cut-n-paste from the example code.
Same errors. Now, I googled the error. 10 items found. No answers. Bugger....

Unable to load tag handler class "com.midnightcookies.taghandlers.LinksHandler" for tag "midnight:links"

<td

>
<midnight:links separator="<br>"/>
</td>

This is the offending block in main.jsp

This stuff is at the top of main.jsp, added automagically by NetBeans IDE (I am missing vi() already! ;-)

<%@page contentType="text/html;charset=UTF-8"%>
<%@page buffer="none"%>
<%-- The <midnight:content/> tag which handles the contents section
is simplistically implemented to use an include. Hence this page
cannot be buffered --%>

<%@taglib prefix="midnight" uri="http://www.midnightcookies.com/midnight"%>

I'd love to debug it myself, but don't really know where to start.
Any hints would be appreciated!

Cheers,
Mark.

Sorry about that. I didn't disable HTML....



udaykumar maddigatla
Ranch Hand

Joined: Feb 03, 2009
Posts: 69
Seems you have written the custom tag.
did you write the tld ? please check the uri which you given in the tld file and you have to give fully qualified class name

did you configure the tld in web.xml?

please check all these things

SCJP 5.0(84%), SCWCD 5.0(97%), SCDJWS 5.0(98%)
Mark Addinall
Greenhorn

Joined: Feb 11, 2009
Posts: 3
udaykumar maddigatla wrote:Seems you have written the custom tag.

I'm not even sure what that means!

did you write the tld ? please check the uri which you given in the tld file and you have to give fully qualified class name

did you configure the tld in web.xml?

please check all these things



Well, not being a new Java coder (I did Java many moons ago when it was a little bitty language similar to UCSD P-System
with pretty graphics.
http://www.midnightcookies.com/

That website doesn't exist. I figure that may just be the problem. Bloody Sun.
Anyone got any ideas?

Cheers,
Mark.

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Do you have the source code for the tutorial? It should come with some library JAR files, one of which defines the midnightcookies tag library. Including that JAR in your project should work.

If you are working purely from text, then you are out of luck unless you can fine someone who has that JAR file. Even having the web site working would not help because you would stilkl be missing the classes that implement the class library (thet would be the next error you would run into).


JBoss In Action
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I found and downloaded the source for the tutorial. There is a midnight.tld file, you need to include that somewhere (in WEB-INF/classes???) Or perhaps as udaykumar suggested, it needs to be mentioned in web.xml. Sorry for the vague answer, it's been a while since I dealt with custom tag libraries...
Mark Addinall
Greenhorn

Joined: Feb 11, 2009
Posts: 3
Peter Johnson wrote:I found and downloaded the source for the tutorial. There is a midnight.tld file, you need to include that somewhere (in WEB-INF/classes???) Or perhaps as udaykumar suggested, it needs to be mentioned in web.xml. Sorry for the vague answer, it's been a while since I dealt with custom tag libraries...



No worries. Thanks. I'll keep mucking around with it.

Cheers,
Mark.
 
jQuery in Action, 2nd edition
 
subject: Unable to load tag handler class "com.midnightcookies.taghandlers.LinksHandler"