Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > taglibs ? where to put taglib classes ?

Reply
Thread Tools

taglibs ? where to put taglib classes ?

 
 
raptor
Guest
Posts: n/a
 
      07-10-2005
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>
<mytagsxx/>
</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.jsp Error(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatc h(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspErro r(ErrorDispatcher.java:200)
org.apache.jasper.compiler.Parser.parseCustomTag(P arser.java:130
org.apache.jasper.compiler.Parser.parseElements(Pa rser.java:1560)
org.apache.jasper.compiler.Parser.parse(Parser.jav a:126)
org.apache.jasper.compiler.ParserController.doPars e(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse( ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(C ompiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:470)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:451)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:439)
org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSTL or Struts taglibs? fishfry Java 2 04-05-2005 01:08 PM
SOLUTION: JSP with Taglibs & JBoss: Fixing NoSuchMethodError on TagAttributeInfo Dale Java 0 11-12-2004 01:26 AM
Problem using JSP/Taglibs with TomCat Huzefa Java 1 08-20-2004 03:04 PM
Nested Tags : Jakarta Taglibs Boni Gopalan Java 1 04-29-2004 09:10 PM
taglibs and limits : HELP !! charly Java 0 12-06-2003 06:24 PM



Advertisments