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

error in ArrayList in JSP

Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
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.

Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Did you add the JSTL taglib directive to your JSP?



Are the JSTL jars in WEB-INF/lib? Your code looks fine to me...


OCJP 6 (93%)
Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
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!!!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

First, replace

with .

See this FAQ to understand why. (but this is probably not going to solve your problem)


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in ArrayList in JSP