Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jstl in eclipse with maven

 
manco capac
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same/similar problem as
jstl in eclipse
, namely :
I'm unable to use jstl in eclipse. It's not recognizing the uri="http://java.sun.com/jsp/jstl/core"


I am attempting to work thru Hibernate Made Easy, CH11 Hibernate with JSPs, and I can't get the maven dependency
figured out such that eclipse won't keep giving me the above problem. I have searched both this and the maven/ant/build
forum and the referenced questions is so close to my problem that I am putting it here, please forgive me if this is the
wrong location.

user.jsp

ERROR

Description Resource Path Location Type
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" user.jsp /HibEasyExamScam/src/main/webapp line 3 JSP Problem


Eclipse 3.5.2
Maven pom.xml
Compiler src/target 1.5

Target
Tomcat 6.0.26

Wrong Maven Dependency


Can someone please point me in the right direction here, I've been spinning my wheels and can't seem to get by these
dependencies

Thanks,
Tim
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at http://repo1.maven.org/maven2/taglibs/standard/ you will notice that there is no entry for a 1.2 standard tag library. If you need 1.2, you will have to install it in you local repository (maven should have even told you the command syntax to use to do that) or find a repository that has the 1.2 version.
 
manco capac
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,

Thanks for the response/clue. I was pretty much turned around, I see now that the jstl jars changed names between 1.1 and 1.2
and they changed repository locations.
I found the next clue here:
Jstl Tag Lib Definitions at JavaRanch
Since my Tomcat is 6.0 I needed jstl-impl-1.2.jar and jstl-api-1.2.jar.
Repo location GlassFish Reop

From there I ran into trouble with jars being left in my Eclipse Tomcat /webapp dir - deleted those and started over.
then found problems with c.tld, I believe this had to do with servlet-api.jar being loaded in my war/webapp - delete it
then there was el-api.jar. This got dragged in by some other lib, resulting in the following error:
javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;

The issue here is that Tomcat 6 uses and old version of el-api.jar, the fix is to download the el-api-2.2.jar. Delete
the one from Tomcat6_home/lib and replace it with the 2.2 version, rename it to el-api.jar. Then make sure your
pom.xml doesn't include el-api-2.2.jar by adding the dependency and marking its scope as provided.

After all of that it works. This was part of my quest to get Hibernate Made Easy, CH 11, user.jsp to run under
eclipse 3.5.2, with Tomcat 6. The following is the pom.xml that works for me.



So now it works

Thanks again, I hope this helps the next guy ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic