taglibs ? where to put taglib classes ?

R

raptor

hi,

I dwelwing with this whole day. I'm using Netbeans but also tried
manualy.So what I've done :

1. created in WEB-INF/tags/mytags.tld a tag called xxx(via netbeans
interface). snippet :

....
<taglib ...>
...
<tag>
<name>xxx</name>
<tag-class>my.XxxTag</tag-class>
<body-content>empty</body-content>
<display-name></display-name>
<small-icon></small-icon>
<large-icon></large-icon>
<description></description>
<example></example>
</tag>
</taglib>

2. Here is the .jsp page
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="my.*"%>
<%@taglib prefix="mytags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>JSP Page</title></head>
<body>
<mytags:xxx/>
</body>
</html>


3. with netbeans3.6 interface I generated the code i.e. the "class
xxx". (jsp1.2)
I also tried the jsp2.0 way i.e suppling only doTag() method.
Code snippet :
package my;

public class XxxTag extends BodyTagSupport {
.....


4. I tried to deploy the library as described int the netbeans docs
- generate jar,compile,cut/paste in WEB-INF/lib
I also tried to manualy symlink WEB-INF/classes/my to WEB-INF/tags/my
(where the code reside)
I also tied to copy the class in classes dir...etc.etc...

But I still get :

org.apache.jasper.JasperException: /test2.jsp(15,0) No tag "xxx"
defined in tag library imported with prefix "mytags"
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:200)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1308)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1560)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



Do u have any idea how to solve this problem..i've tried other things
too, several times starting from scractch but doesnt seem to work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top