• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Class not found..

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
I am using Tomcat 4.1.. I am using taglibs..I have kept my files as described below..
Tag handler class in /web-inf/classes/
tld file in /web-inf/
and jsp in /jsp/
I am getting an error describing that the class cannot be resolved i.e.,cannot resolve symbol for the class name..I guess its not able to load the class..
So whats the probs...?
Hoping for a positive reply..
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hiiii..
which classes are u talking about??? please give more info.. have u given the path of the tld files in the web.xml file like below..

please specify abt error in more detail... paste the excat error if possible..
Thanx
Amit
 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not given the taglib description in web.xml but have directly used the taglib as
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="mytag" %>
 
Amit KumarS
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think u need to mention that in that web.xml..
'cause when in JSP u say taglib uri ="xyz.tld" then it goes and looks inside the web.xml and picks the <taglib-location> from there and loads that tld file... and works accordingly..
try this out and tell me if it works..
Thanks
Amit
 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error stack trace is:
 
Amit KumarS
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
is this stack trace even after adding that taglib code in ur web.xml or before...
and can u paste me the code of usingtag.jsp.. atleast the first 10 lines..
then i might be able to deduce better..
Thanks
Amit
 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its a simple jsp file..n even after adding the taglib element in web.xml i m getting the same error as unable to load class nischal..That means its getting the tld file..but i guess theres some probs with the class file..i mean not getting the class file but the class file is placed in the classes

 
Amit KumarS
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey..
the error seems to be pretty harmless
in the <tag>
there is <tagclass>, it should be <tag-class>

it should be

check this out ans tell me if it works...
Thanks
Amit
 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is giving an error in xml file..I mean not allowing tag-class..only allows tagclass..
 
Amit KumarS
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which dtd are you using??
i use the following dtd..
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
with this tag-class is used..
but if you are using following older version then foloowing is used
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

have u mentioned you tag handler class in some package or what?? if it is so then u need to mention that too in your taglib descriptor
i am giving you a sample code... might be of some help

tell me if this is of some help....
Thanks
Amit
reply
    Bookmark Topic Watch Topic
  • New Topic