• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resolving URIs to TLD files locations

 
Rick Rangers
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

In the book of Deshmukh there is an example (page 291)
<taglib>
<taglib-uri>
http://www.manning.com/sampleLib"
</taglib-uri>
<taglib-location>
yourLibs/sample.jar
</taglib-location>
</taglib>

Because the taglib-location is a non-root relative URI, the JSP
engine prepends /WEB-INF/ to the URI and assumes the location to
be relative to the web's application's document root directory -->
<doc-root>/WEB-INF/yourLibs/sample.jar

Ok, I get that. But aren't JAR files supposed to be in the lib directory
of the web application?
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The required jar files should be in your classpath. Container will automatically load them. But in your specific case as you are explicitly mentioning the jar file location so it is not necessary to put it in WEB-INF/lob directory.
 
Rick Rangers
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Amir!

But in the presented example, suppose the jar files also
contains class files will the container find them (since
the jar file is not in the class or lib directory?

Regards,
Rick
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rick Rangers:
Thanks Amir!

But in the presented example, suppose the jar files also
contains class files will the container find them (since
the jar file is not in the class or lib directory?

Regards,
Rick


I think no. Can anyone please confirm it.
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes they are supposed to be..

but no body obstructed you from putting them in some other directory...
unless its takes care of to be found by the container ( as in above cade )
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic