File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JasperException with JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JasperException with JSTL" Watch "JasperException with JSTL" New topic
Author

JasperException with JSTL

Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
My dear fellow ranchers,

Requesting you to kindly help me with the following scenario.

I am using Tomcat 5.0.30 and I thought i would learn a bit of JSTL. So, I got the jar files jstl-1.1.1.jar and standard-1.1.1.jar along with the other jar files.

My JSP looks like



My web.xml file looks like



The jars are in the /WEB-INF/lib folder and the ".tld" files are in the WEB-INF folder.

After doing all these things, the error I get looks like


org.apache.jasper.JasperException: /Demo.jsp(10,6) According to TLD or attribute directive in tag file, attribute value does not accept any expressions


Any help in this regard? Please let me know where am I going wrong.

Cheers,
Ram.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

You don't need to include the tag elements in the web.xml, and you are using the wrong URI for the JSTL. The tld files should be left inside the jars where the container can find them via the URI.

Remove the web.xml elements, delete the tld files, and see the JSP FAQ for more details on using the right URI for JSTL 1.1 and JSP 2.0.
[ April 01, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mani vannan
Ranch Hand

Joined: Aug 21, 2004
Posts: 185
"according to the tld spec, the expression is not allowed" -- means you cannot use 'expression' as an argument to the attribute of <c ut>


Manivannan
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
As stated in the FAQ: http://faq.javaranch.com/view?JstlTagLibDefinitions

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

You have on your page the JSTL1.0 uri: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

Use the correct taglib import statement, and your problems should disappear.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JasperException with JSTL