• 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

Failed to load or instantiate TagLibraryValidator

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying to create a sample web application using JSTL. I'm using Tomcat 5.5, J2EE 1.4.

On running the app, I'm getting the exception


I copied both jstl.jar and standard.jar into WEB-INF/lib folder and all tlds to WEB-INF folder. In fact org.apache.taglibs.standard.tlv.JstlCoreTLV is present in the lib folder.

In one of the FAQS for JSP, it is told that keeping jstl.jar and standard.jar in classpath does not make any difference.

Please let me know, what could be the reason for the exception inspite of the availability of the class. Do I need to make any entry in web.xml?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Schandha Ravi:
and all tlds to WEB-INF folder

What tlds? You shouldn't need to copy any tlds anywhere. Where did you get these tld files?

In one of the FAQS for JSP, it is told that keeping jstl.jar and standard.jar in classpath does not make any difference.

That is correct. The container ignores the system classpath. That's why you place the jar files in WEB-INF/lib.

Do I need to make any entry in web.xml?

No.

What URIs are you using? Is your web.xml correctly declared for servlets 2.4?
[ March 10, 2008: Message edited by: Bear Bibeault ]
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

I downloaded a jar from Jstl Download and copied the tlds into WEB-INF folder.

I'm using the uri

in my jsp code. and my web.xml is based on following schema
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

and copied the tlds



Again, what TLDs? There should be no TLDs copied.
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

this time I removed all tlds , just copied the jstl.jar and standard.jar in to WEB-INF/lib folder. But still I'm getting the exception

 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can some one please clarify me on this exception.

Thanks
Ravi
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure that you grabbed the JSTL 1.1 jar files?
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

I downloaded jakarta-taglibs-standard-1.1.2 from the JSP FAQS link provided in javaranch, and copied jstl.jar and standard.jar into lib folder of WEB-INF. I have also included these jar files classpath. But no use
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And you restarted the container ?
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I did.

Let me put my code below, so that it would be easy for you to let me know where am I making mistake

My Servlet


My Results.jsp


web.xml


apart from these, I'm using tomcat 5.5 and copied jstl.jar, standard.jar into WEB-INF/lib folder

and my url is http://localhost:8080/ExampleWeb/*.do
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is working now.

I redesigned my application. This time as bear suggested, I just copied the jstl.jar and standard.jar into WEB-INF/lib folder and neither added any tlds nor added any taglib in my web.xml. It worked fine for me. Not sure what went wrong previously..

Thanks for all the information shared
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank goodness! I was running out of ideas!
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

Not sure if my question is related to struts or general JSP. In this post, I understood that we neither need to copy any tlds nor editing web.xml to include taglib element is needed. However when we use struts framework, in many books I referred they copied the tlds to WEB-INF folder and also added taglib element in web.xml.

My first question is, for struts framework, do we need to copy tlds as this is separate from JSP specification.
Secondly, my web.xml is based on web-app_2_4.xsd, in which taglib element is not allowed. But all the examples I referred as based on previous versions, where in taglib is allowed. So how do I accomplish my task with web.xml based on 2.4 xsd. How do I map say


to the actual location of tld for struts-logic.

Thanks in advance.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Schandha Ravi:
in many books I referred they copied the tlds to WEB-INF folder and also added taglib element in web.xml.

This is only necessary if the TLD does not contain a proper URI declaration.

My first question is, for struts framework, do we need to copy tlds as this is separate from JSP specification.

It has nothing to do with whether the taglibs are "official JSP" or not, but rather with how the TLD is constructed.

What you have to do for Struts is a better question for the Struts forum. I won't use it.
[ March 18, 2008: Message edited by: Bear Bibeault ]
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear.

I shall go through struts forum.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic