Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

taglib descriptor

 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my JSP, i am displaying all the values from the list as below.

And on the top, i am adding something like this.


Its giving an error "cannot find the taglib descriptor for http://java.sun.com/jsp/jstl/core in eclipse.

Can anyone help me on this
 
Srikanth Nutigattu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add the "JSTL library" for that to work.
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
can you tell me how and where to add this. Thanks
 
sudipto shekhar
Ranch Hand
Posts: 823
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We know that the TLD file can be placed under the /WEB-INF directory and the container will find the .tld file.
If you are using eclipse, place the .tld file under /WEB-INF/tlds/ . I am sure it will work then. Try it out.

Also keep in mind you put the jstl.jar file and the standard.jar file under /WEB-INF/lib/

Hope this works.
[ November 25, 2008: Message edited by: Sudipto Shekhar ]
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In web.xml, i have added like this.

I dont know how should i write example.tld file for this. Please assist.
[ November 25, 2008: Message edited by: renu richard ]
 
sudipto shekhar
Ranch Hand
Posts: 823
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by renu richard:

can you tell me how and where to add this. Thanks


You can find the jstl.jar and standard.jar files from your Tomcat installation directory.
The exact location is under your tomcat 5.0 directory /webapps/jsp-examples/WEB-INF/lib directory.
For tomcat 6.0 it is \webapps\examples\WEB-INF\lib . Here you will find the two jar files required for JSTL 1.1 spec.

Hope this helps.
 
sudipto shekhar
Ranch Hand
Posts: 823
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried what I said?
 
sudipto shekhar
Ranch Hand
Posts: 823
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by renu richard:

In web.xml, i have added like this.

I dont know how should i write example.tld file for this. Please assist.



See if you are using JSP 2.0 spec, you don't need to add this in your web.xml file.
The <taglib-uri> is no more mandatory for the purpose of JSTL 1.1 and JSP 2.0 spec.

Follow what i said for eclipse.I am sure it will work for you.
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot sudip. Its working.
[ November 25, 2008: Message edited by: renu richard ]
 
sudipto shekhar
Ranch Hand
Posts: 823
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry it's Sudipto.

Thank you.


 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic