File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Error in printing arraylist using jstl

Neha k Agrawal
Greenhorn

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
Sheriff

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
Greenhorn

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
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

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.


Steve
mohan pusarla
Greenhorn

Joined: Jan 31, 2008
Posts: 2
hi,
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
Greenhorn

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: http://aspose.com/file-tools
 
subject: Error in printing arraylist using jstl