• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Taglib in web.xml ?

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do i have to put explicit mapping for taglib in web.xml ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. The container will do the necessary work for you.
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Hanumant Deshmukh, It's given that we have 2 types of mapping

1. Explicit Mapping -> That we specify in web.xml

OR

2. Implicit Mapping -> That we specify in .tld file using <uri>

Is there anything like explicit mapping in J2EE 1.4 as when i use
[/URL]

it doesn't give me option of <taglib> to be declared in web.xml ???


I saw on SUN's site. Objective 6.6
Configure the deployment descriptor to declare one or more tag libraries
Where is this objective covered in HFSJ ???


BTW InHD P-291 they use web-app_2_3.dtd instead of 2_4.xsd. Why?
[ March 17, 2008: Message edited by: Sandeep Vaid ]
[ March 17, 2008: Message edited by: Sandeep Vaid ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
InHD P-291 they use web-app_2_3.dtd instead of 2_4.xsd. Why?

This book was not properly updated for SCWCD1.4. I know, I used it. Be very careful when using this book. I've spent a lot of time crosschecking it with the spec... I advise you to look into Manning's forum for erratas made by readers.
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i know HD have many many errors :

BUT I saw on SUN's site. Objective 6.6
Configure the deployment descriptor to declare one or more tag libraries
Where is this objective covered in HFSJ ???
 
Vikas Parikh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its element name & everything are same as before, meaning

<taglib>
<taglib-uri> </taglib-uri>
<taglib-location> </taglib-location>
</taglib>

the only thing is that its position has been changed from directly under web-app to web-app/jsp-config, meaning

<web-app>

.
.

<jsp-config>

.
.

<taglib>
<taglib-uri> </taglib-uri>
<taglib-location> </taglib-location>
</taglib>

.
.

</jsp-config>

.
.

</web-app>



Vikas Parikh
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,
i got the answer to my question. It is nicely given in HFSJ P-475

According to the JSP 2.0 container, NO <taglib> entry is required in the DD. However if you specify
a <taglib> entry in the dd, the JSP 2.0 container will use it. In fact cotainer will give it preference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic