I need to show the previously executed command in the table in the webpage for the current session. But, I am getting only one the last executed command in the table. I don't know what I am missing...
ArrayList commands = (ArrayList)session.getAttribute("commands");
String cmd = (String)request.getAttribute("text1");
commands.add(cmd);
session.setAttribute("commands",commands);