| Author |
Problem passing an arrayList from a servlet to a jsp
|
Raymond Champion
Greenhorn
Joined: Jan 21, 2009
Posts: 13
|
|
Hello,
I am having trouble getting an ArrayList I created in my servlet to get passed to my JSP.
I think I have correctly put the resultset into my bean called SubmissionEvents.
From here I am trying to pass this arraylist to my JSP(homepage.jsp). My app hangs when I run it, after I login into app.
If I remove the <jsp:useBean > tags from the JSP page I am trying to display then the JSP page will display.
If you have any insight into what I am doing wrong and can help me?
Servlet code
The JSP (homepage.jsp)
My bean SubmissionEvents.java
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14669
|
|
1. Your useBean tag uses the session scope.
2. Your useBean tag expects a SubmissionEvents
3. "seResult" lives in the request scope
4. "seResult" is a List
That doesn't fit. You don't need to use useBean here. Using the EL expression ${seResult} should return you the list, which you can iterate through.
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: Problem passing an arrayList from a servlet to a jsp
|
|
|