aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes jstl in eclipse with maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "jstl in eclipse with maven " Watch "jstl in eclipse with maven " New topic
Author

jstl in eclipse with maven

manco capac
Greenhorn

Joined: Dec 11, 2004
Posts: 7
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

Joined: May 14, 2008
Posts: 5836
    
    7

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.


JBoss In Action
manco capac
Greenhorn

Joined: Dec 11, 2004
Posts: 7
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 ...
 
Don't get me started about those stupid light bulbs.
 
subject: jstl in eclipse with maven