• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

error in ArrayList in JSP

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

I could not find exactly what I need to know in order to fix this problem. Hope someone can help me out.

In my Controller (names in code below changed for proprietary reasons):



In my JSP:



I got compile errors on my JSP:

Invalid attribute (items)
Invalid attribute (value)
....


Questions:

Do I need to do .setAttributes for item, if so, how?
Is this the right way to pass an ArrayList to the View (from ModelAndView)?
Why am I getting these errors and how can they be solved?

Thanks very much in advance.

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you add the JSTL taglib directive to your JSP?



Are the JSTL jars in WEB-INF/lib? Your code looks fine to me...
 
Mimi Tam
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Lorand.

I have this as a separate file (include.jsp):


and I included it my JSPs that referenced these taglibs:


but its not working

Any other ideas would be greatly appreciated. Thanks!!!
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, replace

with .

See this FAQ to understand why. (but this is probably not going to solve your problem)
 
reply
    Bookmark Topic Watch Topic
  • New Topic