File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Error in printing arraylist using jstl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Error in printing arraylist using jstl" Watch "Error in printing arraylist using jstl" New topic

Error in printing arraylist using jstl

Neha k Agrawal

Joined: Mar 25, 2008
Posts: 25
Hello all ,
I am facing a problem in printing the arraylist in JSP using JSTL.Please help as I am new to this technology.

code in action class

where resultlist is my arraylist. I am getting value in action class.I have checked by printing it.

code in JSP

In jsp I am getting the DropDown as empty.Now values are coming.Can anyone tell what is wrong?Thanks a ton in advance.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Are you mixing Struts tags with JSTL tags?
If so, why?
If you are using Struts, why not use the mechanism provided by it?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Neha k Agrawal

Joined: Mar 25, 2008
Posts: 25
Thanks Ben for replying.As I told you that I am very new to this technology.I was going through different articles & forums on net.I found that people have talked about passing an arraylist from action class & printing that arraylist in jsp using JSTL.I don't know the Struts way of doing it.Please explain it by giving some example that will be really helpful.
Steve Luke

Joined: Jan 28, 2003
Posts: 4181

Since there is a lot to Struts, it is best if you look through their documentation to learn about what it can do. A good place to start would be at their developer's guide. Then, for specific information about the tags that are available, try their tag reference documents.

mohan pusarla

Joined: Jan 31, 2008
Posts: 2
there is nothing wrong in using jstl with struts.Because you can use any tag lib to access your values.I feel there can be two reasons for not displaying the values.
1) Either your jstl is not properly configured.
2) other can be your jstl tag usage is wrong
Neha k Agrawal

Joined: Mar 25, 2008
Posts: 25
Thanks a lot Mohan.I got solution.My JSTL was not configured properly.So now I am closing this post.Thanks to all who have helped me by replying.
I agree. Here's the link:
subject: Error in printing arraylist using jstl
It's not a secret anymore!