views:

15

answers:

1

I'm new to JSP, using Eclipse, and am trying to just get started with templates. I've imported template.tld into WebContent/WEB-INF/tlds. Guide: http://www.javaworld.com/jw-09-2000/jw-0915-jspweb.html

When I run the test.jsp file, I get this error:

org.apache.jasper.JasperException: /test.jsp(3,0) Unable to load tag handler class "tags.templates.InsertTag" for tag "template:insert"

I've tried searching Google, but am unable to find a solution. Any help would be greatly appreciated!

template.jsp

<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='template' %>

<html><head><title><template:get name='title'/></title></head>
<body>
Welcome!<br />
<template:get name='content'/>
</body></html>

test.jsp

<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='template' %>

<template:insert template='/template.jsp'>
    <template:put name='content' content='this is our website'/> 
</template:insert>
A: 

Have you also added the taglib's classes to /WEB-INF/lib or /WEB-INF/classes? Just having the TLD is not enough, you need the code that actually implements it. Your error message fragment suggests you haven't done that.

skaffman