• 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

JSTL forEach for ArrayList question

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following mistake happen when I use JSTL, whether please do me a favor by the older generation.
"org.apache.jasper.JasperException: /Test.jsp(33,8) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
"

After servlet end collects the materials with ArrayList, convey session to jsp to receive


After JSP is received with the following JSTL, play selecting in the form under putting one



[ August 10, 2005: Message edited by: Sam Cgeng ]
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
make sure you have these at the top of your page:

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

and NOT this:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the JSP forum..
 
Sheriff
Posts: 67747
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

make sure you have these at the top of your page:

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



This is true if, and only if, you are using JSTL 1.1 with a JSP 2.0 container.

If Sam is using a JSP 1.x container, the problem will lie elsewhere.

So Sam, what JSP version and JSTL version are you running?
 
Sam Cheng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I establish according to the method of Ola Daniel, the problem has already been solved, thank you!

Bear Bibeault,The container that I used is Tomcat 5.0, the problem has already been solved now, thank you for your answers!
[ August 10, 2005: Message edited by: Sam Cgeng ]
 
Bear Bibeault
Sheriff
Posts: 67747
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

he container that I used is Tomcat 5.0



Yes, As Tomcat 5 is a JSP 2.0 container, Ola's answer is correct. The URI he provided references the JSTL 1.1 (as opposed to the JSTL 1.0) which is what should be used with JSP 2.0.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic