• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JasperException with JSTL

 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"according to the tld spec, the expression is not allowed" -- means you cannot use 'expression' as an argument to the attribute of <c ut>
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic