• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL Error?

 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat just started giving me this error:

Unresolved compilation problems: org.apache.taglibs cannot be resolved or is not a type org.apache.taglibs cannot be resolved org.apache.taglibs cannot be resolved or is not a type

This line seems to be the root of the problem:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

Everything work yesterday perfectly. Anyone seen this before? Any ideas on how it can be resolved?
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok this is weird.

I re-added the JAR files for JSTL, restarted the server and nothing. Than I made this change to the import line:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

Now it works. Am I just going crazy here or what?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is weird. Server may have just gotten itself into a bizarre state. If it keeps happening, that's another story...
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is another clue. I was justing looking through the servlets that Tomcat generates from my JSP code and noticed:

org.apache.taglibs.standard.tag.rt.core.ForEachTag

I am using Eclipse and this line is giving a compiler error:

org.apache.taglibs cannot be resolved or is not a type

The weird thing is the page works. Any ideas?
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. This issue may have been left over from when my server got stuck in some kind of bad state.

I deleted all the compiled files in org\apache\jsp and recompiled them. They seem ok now.

Not sure what is going on? But it seems ok now.

Bear thanks for responding to my post on Saturday. Your responsiveness is much appreciated.
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Luke,

I've just encountered the same problem for the entire week.

It was fine the first time I copied standard.jar and jstl.jar into my [web-server]/WEB-INF/lib folder. However, a few days later, all my pages using jstl tags started to give "org.apache.taglibs cannot be resolved or is not a type" error.

Following another advice from a forum, I include stardard.jar and jstl.jar into my project classpath. However, it still wasn't enough as the error persisted.

However, after reading your similar problem, I knew that I need to force a recompilation either by changing something in the JSP or delete the relevant *_jsp.java files.

Now it works. Thanks !
Originally posted by Luke Shannon:
Ok. This issue may have been left over from when my server got stuck in some kind of bad state.

I deleted all the compiled files in org\apache\jsp and recompiled them. They seem ok now.

Not sure what is going on? But it seems ok now.

Bear thanks for responding to my post on Saturday. Your responsiveness is much appreciated.
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good to hear Ken. Glad this thread was able to help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!