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>
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?
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
Gift giving made easy with the permaculture playing cards