MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
curmudgeon99
Post subject: JSTL 1.2 + Servlet 3.0 + Tomcat 7 = NIghtmare  PostPosted: May 20, 2012 - 03:52 PM
Registered Member
Registered Member


Joined: Aug 14, 2006
Posts: 29

Using MyEclipse 10.1

Have defined my project's web.xml

Code:

<web-app
     xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
     version="3.0">


Have NO tld defined in web.xml

Have downloaded the glassfish API and IMPL for JSTL 1.2 (Servlet 3.0 compliant), with these Maven dependencies and also in the MyEclipse project to make Eclipse happy. But notice they are given a scope of <provided>. If I don't do that, Tomcat 7 complains of LinkageExceptions.

Code:

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>3.0.1</version>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>org.glassfish.web</groupId>
    <artifactId>javax.servlet.jsp.jstl</artifactId>
    <version>1.2.1</version>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>javax.servlet.jsp.jstl</groupId>
    <artifactId>javax.servlet.jsp.jstl-api</artifactId>
    <version>1.2.1</version>
    <scope>provided</scope>
</dependency>


Have the following statement at the top of the JSP:

Code:

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


Note this is the allegedly correct path for JSTL 1.2

At this point, MyEclipse makes no complaints.
There are no other JSTL jars in the Tomcat 7 lib or in my WEB-INF/lib directory.

When I hit the page that has the JSPs, I get this exception:

Code:

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application


What am I doing wrong? Any ideas?
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: May 22, 2012 - 07:34 AM



Joined: Nov 11, 2010
Posts: 2499

curmudgeon99 ,

Sorry that you are seeing this issue.

Can you please check these links ? :

http://stackoverflow.com/questions/4928271/jstl-1-2-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-resolved
http://stackoverflow.com/questions/2427486/org-apache-jasper-jasperexception-the-absolute-uri-http-java-sun-com-jsp-jst

I suggest you also cross post to development forums for better support.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
support-joy
Post subject:   PostPosted: May 22, 2012 - 07:56 AM
Registered Member
Registered Member


Joined: Feb 03, 2009
Posts: 3442

curmudgeon99,

You need to get the right version of JSTL, they use different URIs. Check if you have jstl-api.jar and jstl-impl.jar in your project build path? If not, please add the same. I think you need to use JSTL version 1.2. You could download the same from here - http://jstl.java.net/download.html

_________________
Joy
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
curmudgeon99
Post subject:   PostPosted: May 27, 2012 - 01:29 PM
Registered Member
Registered Member


Joined: Aug 14, 2006
Posts: 29

support-joy wrote:
curmudgeon99,

You need to get the right version of JSTL, they use different URIs. Check if you have jstl-api.jar and jstl-impl.jar in your project build path? If not, please add the same. I think you need to use JSTL version 1.2. You could download the same from here - http://jstl.java.net/download.html


Joy,
Thank you for attempting to help me but do you see the Maven dependencies?
Please notice that I refer to version 1.2.1 of those precise dependencies you mention.
I can assure you they exist on my classpath. Did you not see that I mention those two precise JARs you asked if I have?
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits