Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c.tld: (line 2, col -1): Element type "taglib" is not declared?

 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just got Tomcat 6 was on tomcat 4.

I get this weird error with c.tld. It looks like the error itself is wrong.

How could an error occur in column -1?

Lets have look at c.tld.

I am stupefied.

[ May 02, 2007: Message edited by: Garrett Smith ]

[ May 02, 2007: Message edited by: Bear Bibeault ]

[ May 02, 2007: Message edited by: Garrett Smith ]
[ May 02, 2007: Message edited by: Garrett Smith ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is c.tld outside of its jar file?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does "TC6" mean Tomcat 6? Please avoid using such abbreviations... escpecially when you use "tomcat 4" in the same sentence. All it creates is confusion -- it took me a few reads to realize that you weren't using tomcat 4.

Read this.
[ May 02, 2007: Message edited by: Bear Bibeault ]
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I just edited my post. Tomcat 6. I hope that clears up any confusion.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what's up with the -1, but I ask again, what's c.tld doing outside of its jar? Did you extract it for some reason?
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
should I just plop this in my WEB-INF/lib

jakarta-taglibs-standard-1.1.2.zip


?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you should only need to include the jar files in WEB-INF/lib.

Do not extract the TLD files, do not put any goo in web.xml.

Usually there are two files for the JSTL: jstl.jar and standard.jar. Be sure that you have both if the distributon is such.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so now I have:

Removed the taglib entries from web.xml.

restat tomcat 6 and:




Did I put the zip file in the right place? jakarta-taglibs-standard-1.1.2.zip contains both: jstl.jar standard.jar

Please advise.

Thank you,

Garrett
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the jar files that need to go into WEB-INF/lib, not the zip distribution file.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
standard.jar and jstl.jar in WEB-INF/lib


So I opened up my localhost[date].log and found this INFO before the error stack:

I don't know what's up with that col -1 or the error. It looks wrong. And web.xml looks fine to me.


So I try examples:
http://localhost/examples

JSTL examples all have an error:
org.apache.jasper.compiler.ParseException: /jsp/jsp2/tagfiles/panel.jsp(16,0) Taglib directive: Mandatory attribute uri missing

JSPX examples are not server-parsed:
http://localhost/examples/jsp/jsp2/jspx/basic.jspx



I am using mac 10.4.9 and java 5 (1.5.0_05-48)

What could I have done wrong?
[ May 03, 2007: Message edited by: Garrett Smith ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never had any of these types of problems, but I haven't tried out Tomcat 6 and have no reason to at this point.

Is there any reason you're using Tomcat 6 rather than 5.5 other than "it's the latest"?
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded Tomcat 6 again. The JSTL examples work.

But I cannot get JSTL to work in my own app.

I get the same -1 errors.

I am going to try and troubleshoot this additively by startin with something I know works and add to it.

I think I'll stick with Tomcat 6. It might be it easier to upgrade from Tomcat 6 to Tomcat 6.5 when 6.5 is released; potentially avoiding having to do more work to upgrade in the future.

The improved memory allocation might help. If I find any bugs, I can report them back to the development team (progress). Although the real reason is I don't want to get behind. My site is already so old and out of date. It is amazing how quickly things change.

http://tomcat.apache.org/whichversion.html

Thanks for the help.

Garrett
[ May 03, 2007: Message edited by: Garrett Smith ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic