File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes web.xml couldn't detect taglib tag anymore? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "web.xml couldn Watch "web.xml couldn New topic
Author

web.xml couldn't detect taglib tag anymore?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
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

Joined: Jan 10, 2002
Posts: 61218
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
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

Joined: Jan 10, 2002
Posts: 61218
    
  66

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

Joined: Apr 13, 2005
Posts: 438
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

Joined: Jan 10, 2002
Posts: 61218
    
  66

Chapter 13 of the Servlet Specification has everything you need to know.
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
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

Joined: Jan 10, 2002
Posts: 61218
    
  66

Are you downloading the PDF or the zip file? I just downloaded it and the PDF is the specification.
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
sorry , bear , i thought the html and pdf are same ...i have it now ...thanks for guidance
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
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"%>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web.xml couldn't detect taglib tag anymore?