| Author |
Class not found..
|
Nischal Tanna
Ranch Hand
Joined: Aug 19, 2003
Posts: 182
|
|
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..
|
Thnx
|
 |
Amit KumarS
Ranch Hand
Joined: Oct 10, 2003
Posts: 100
|
|
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
|
****************************<br />In 24 hrs Earth rotates once on its Axis.
|
 |
Nischal Tanna
Ranch Hand
Joined: Aug 19, 2003
Posts: 182
|
|
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
Joined: Oct 10, 2003
Posts: 100
|
|
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
Joined: Aug 19, 2003
Posts: 182
|
|
The error stack trace is:
|
 |
Amit KumarS
Ranch Hand
Joined: Oct 10, 2003
Posts: 100
|
|
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
Joined: Aug 19, 2003
Posts: 182
|
|
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
Joined: Oct 10, 2003
Posts: 100
|
|
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
Joined: Aug 19, 2003
Posts: 182
|
|
|
It is giving an error in xml file..I mean not allowing tag-class..only allows tagclass..
|
 |
Amit KumarS
Ranch Hand
Joined: Oct 10, 2003
Posts: 100
|
|
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
|
 |
 |
|
|
subject: Class not found..
|
|
|