reset password
Author Message
Posts: 11
Posted 23:51 Jun 28, 2015 |


Model class: 

public class NameNdJobs {
String name;
ArrayList<String> jobsApplied;



How do I get all values from jobsApplied on jsp page and compare with one string variable?

I have tried inner loop concept. It doesn't work for me. I can't see any output on jsp. So, there might be problem with loop or comparison with string variable and jobsApplied values.What is the jstl loop structure for variable with list of values.?


Posts: 29
Posted 00:00 Jun 29, 2015 |
Well you want to get value from jsp to servlet and then compare it with some string value? And then again display it to some other jsp ?
Posts: 11
Posted 00:45 Jun 29, 2015 |

Nope. I want values from ArrayList. 

Eg. For single value: 

ArrayList<Jobs> entries = new ArrayList<Jobs>();

Then,on JSP page:

<c:forEach items="${entries}" var="entries" >

where, usually we have variable as a string value or int value.

But, I have defined ArrayList string variable there in model instead of just string variable.

Posts: 11
Posted 00:51 Jun 29, 2015 |

Got the solution. Thanks for reply NEILCHOKSI.