• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jasper Exception  RSS feed

 
SP Nam
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I just started developing small jsp page and JSTL inside it. I am getting this error, No idea why Tomcat throwing this exception even though I have jstl.jar in WEB_INF/lib and web.xml in WEB-INF folder.

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

Some suggestion.

Thanks
SP Name
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you downloaded a copy of the JSTL and added it to your web app?

If not see the JSP FAQ for download information. Be sure to get the right version of the JSTL for the version of JSP that you are using.
 
SP Nam
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, I added jstl to web apps directory.

http://java.sun.com/jstl/core, This url itself is not available then how it works.

any suggestion.

SP Nam
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, I added jstl to web apps directory.


Can't help you without some details. Please read this.
 
SP Nam
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for that.

My directory Structure is like this:

Program Files
|Apache Group
|Tomcat 4.1
|Webapps
|Jakarta-taglibs-standard-1.0.6
|myDir
|abc.jsp
|WEB_INF
|web.xml
|lib
|jstl.jar

This is my Dir Structure, I am just trying to execute a simple jsp page.


"
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>Simple Example</title>
</head>
<body>

<c:set var="browser" value="${header['User-Agent']}"/>
<c ut value="${browser}"/>

</body>
</html>

"
After starting Tomcat Server, I am accessing this url : http://localhost:8080/myDir/abc.jsp
Then I am getting Jasper exception.

I hope this is clear now.

Thanks
SP Nam
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is standard.jar?
 
k matt
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way to do it is , put all the *.tld files in /WEB-INF/ folder
of your application and change the uri="/WEB-INF/c.tld" and make sure you put your jar files in /CATALINA_HOME/common/lib/ and have all those jars in your CLASSPATH. Please let me know whether this works.




k matt
[ October 20, 2005: Message edited by: k matt ]
 
Stefan Evans
Bartender
Posts: 1836
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>One way to do it is , put all the *.tld files in /WEB-INF/ folder
Yes that would work, but it is NOT the recommended approach.
The tld files are all in standard.jar

If jstl.jar AND standard.jar are in the web-inf/lib directory (restart Tomcat), everything will work fine.
 
k matt
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do we have to map all the those tag uri's in web.xml if we put in /web-inf/lib ?? I am not sure whether the mapping has to be done.

k matt
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Stefan stated, extracting the tlds and putting mappings into web.xml is messy and unecessary. The tlds are already in the jar files. If the correct jar files are in the web app's path (as in WEB-INF/lib) and the correct URIs are used to reference them, the container will automatically find them via an auto-discovery process.

But you must be sure that the jar files are there. It appears that the OP has placed jstl.jar in the proper place, but that file only has the API for the JSTL. The tags and their tlds are defined in the standard.jar file which appears to be missing.
[ October 20, 2005: Message edited by: Bear Bibeault ]
 
SP Nam
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear

Thanks for quick help.

Its really working now.

SP Nam
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!