Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in printing arraylist using jstl

 
Neha k Agrawal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you mixing Struts tags with JSTL tags?
If so, why?
If you are using Struts, why not use the mechanism provided by it?
 
Neha k Agrawal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic