Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to load tag handler class

 
Shashi Prakash
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have a custom tag "GESubmitTag" which is located

at "com.ge.tags.GESubmitTag".. I have put this in taglib.tld also.. but

while executing this I am getting this error--

Unable to load tag handler class "com.ge.tags.GESubmitTag" for tag "ge:submit"..

I am not sure what mistake I am making for this

Please assist.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shashi prakash:

I have a custom tag "GESubmitTag" which is located
at "com.ge.tags.GESubmitTag"..


I'm not sure what this means.
Where, exactly, did you put the class file for this tag?
 
Shashi Prakash
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My class file is -----



GEImageTag is workign fine...

although there is no difference i think..



[BSouther: Added UBB CODE tags]
[ July 12, 2007: Message edited by: Ben Souther ]
 
Gnanasekaran Sakthivel
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope you got answers...

I didnt understand the error message well.

Make sure of the following (sometimes we just miss some spelling, etc):
1. web.xml - has the <taglib>...</taglib> declaration/reference
2. yyy.tld file under the WEB-INF folder
3. tag-class element in
<tag> <name>submit</name> ... </tag>
exactly matches the class name with package qualification
4. JSP has this header <%@ taglib uri="/WEB-INF/yyy.tld" prefix="test"%>
5. Usage: <test:submit key="links.enforcement.case.newBtn">
Note the "submit" matched the <name> element value...

Once these are passed,
Tag initialization may not have been succeeded. Tag class could not be instantiated may be.. Check the (required) attributes and the way you access the tag from your JSP.

Hope this helps.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gnanasekaran Sakthivel:

1. web.xml - has the <taglib>...</taglib> declaration/reference


This is not necessary. If the TLD is properly formed, the container will automatically find it by its URI.

4. JSP has this header <%@ taglib uri="/WEB-INF/yyy.tld" prefix="test"%>


The uri value should match the URI defined within the TLD, not the path to the TLD.
 
Shashi Prakash
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ..

I got my issue resolved .. In my application we are taking class file from one of the jar and this tag class was not there...
 
Katrina Owen
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Target Scwcd",

Please check your Private Messages on this forum for a message from the JavaRanch Staff.

Kind regards,
Katrina Owen,
Saloon Bartender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic