• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Not being able to locate TLD file?

 
Ranch Hand
Posts: 1162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to run an example on Ch7 of JavaServerPages 3rd ed. by Hans Bergsten.
My TLD file resides inside the WEB-INF folder called taglib.tld
My TLD looks like



this is what the beginning 2 lines of my message.jsp look like:


The error message I get in Tomcat is;

NOTE: I HAVE NOT YET CREATED A WEB.XML file. could this be the cause of this? in the dos prompt it says:
WARNING: Internal Error: File /WEB-INF/web.xml not found
[ October 08, 2007: Message edited by: Chunnard Singh ]
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are specifying URI in the tld file.So,mapping URI to a tld is not necessary if the URI is specified in the taglib and the tld is inside a jar file.So,if this tld is inside a jar file then the JSP engine will find it automatically;However,if the tld file is not in a jar file,then you will have to map the URI to a tld file in web.xml.
 
paritosh ranjan
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you still have some doubts then read "explicit mapping","implicit mapping" and "well known URI's",i hope this will clear out the doubts on this topic.
 
Arvind Mahendra
Ranch Hand
Posts: 1162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi paritosh. I was thinking the same thing that I had to add an entry in web.xml however the web.xml given by the author is as follows nowhere does it have an entry for the TLD file.

I will read the docs you have suggested. where can I find them?
 
paritosh ranjan
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


JSP.7.3.9 Well-Known URIs

A JSP container may �know of� some specific URIs and may provide alternate
implementations for the tag libraries described by these URIs, but the user must see
the behavior as that described by the required, portable tag library description
described by the URI.
A JSP container must always use the mapping specified for a URI in the
web.xml deployment descriptor if present. If the deployer wants to use the
platform-specific implementation of the well-known URI, the mapping for that
URI should be removed at deployment time.



I am not sure but the tld you are using looks like a well known uri i.e. URI which is already known to the container.

So,the mapping might not be needed as the container already knows about the well known uri's.

I read that mapping stuff in a book on scwcd by Hanumant Deshmukh.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic