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

web.xml couldn't detect taglib tag anymore?

 
Nakata kokuyo
Ranch Hand
Posts: 471
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, good day , i using tomcat 5.0.28 , when i try to convery my existing web.xml which define in 2.3 standard with <!DOCTYPE ..> header

with


it give me some kind of error with message "element taglib not allow here "

where the taglib should be ? or do i miss some other part ...thank you
[ April 15, 2006: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The 2.4 schema is pickier about order than the 2.3 DOCTYPE.

Why do you have taglib declarations in your web.xml in the first place? They're rarely required.
 
Nakata kokuyo
Ranch Hand
Posts: 471
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, Bear Bibeault , is that any reference to show how to construct web.xml file ? thank you

by the way, what wrong in display - name ?


and also, if we didn't put



it can detect tld automatically ? thank you again

[ April 15, 2006: Message edited by: Nakata kokuyo ]
[ April 15, 2006: Message edited by: Nakata kokuyo ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Servlet Specification is the best source for such information.

And yes, the container will automatically find TLD files that pput into the correct locations. There is rearely a need to declare TLDs in the web.xml.
 
Nakata kokuyo
Ranch Hand
Posts: 471
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bear, i meant on the reference to create web.xml file , where we can reference it ?

i have download the servlet spec , it actually servlet API
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chapter 13 of the Servlet Specification has everything you need to know.
 
Nakata kokuyo
Ranch Hand
Posts: 471
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bear, forgive my stupidness ...

i just go to the link here and get download, it just give me API

Servlets 2.4 Specification: http://www.jcp.org/aboutJava/communityprocess/final/jsr154/


and where is the explanation as you mentioned on chapter 13 ....
mind to provide me the reference link that you mentioning ?

sorry for make trouble
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you downloading the PDF or the zip file? I just downloaded it and the PDF is the specification.
 
Nakata kokuyo
Ranch Hand
Posts: 471
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry , bear , i thought the html and pdf are same ...i have it now ...thanks for guidance
 
Stefan Evans
Bartender
Posts: 1687
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
The 2.4 schema is pickier about order than the 2.3 DOCTYPE.

Really? I was led to believe that it was LESS picky - ie order was not important any more. You can mix your "servlet" and "servlet-mapping" to your hearts content.

The change that happened between 2.3 and 2.4, is that taglib entries need to be nested in a <jsp-config> section, rather than at the root level where they were before.

However as Bear has said, you shouldn't need that taglib entry in web.xml any more. The struts taglibs define "standard urls" that you can use to import them now:
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic