I am putting the array values in session....but when i getting the array in jsp i am getting only last value......not the full array.
code is as follows:
jsp page where i am getting the session.....
dileep keely
Ranch Hand
Joined: Jun 28, 2010
Posts: 91
posted
0
Don't use scriplet in jsp, rather JSTL will be the right way.
The below would be helpful.
ses.setAttribute("AttNameA",AttNameA); //Assuming that you have the at
ses.setAttribute("AttValueA",AttValueA);
As you already have the attributes set into session you can go with JSTL directly.
<c:forEach var="nameA" items="${AttNameA}">
<c: out value="${nameA}"/>
</c:forEach>
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1002
posted
0
There is also an issue with your code.
The session attribute is set from the methd: "writeDocumentToOutput" .
This method is called recursively.
Every time you call the method it is setting the session attributes, and overrides the previous value it had.
That explains why you only get the "last" value.
This class looks like it was written for an app, and is being adapted for the web.
What is it you are trying to accomplish in the display?