Posted By:
Anonymous
Posted On:
Friday, August 8, 2003 12:06 AM
Perhaps i don't understand properly your message, but if you just want to read user-name and four int, just create a class that contains the following information
public class XXXX {
private String userName;
private int [] userInput;
...
...
}
From JSP page just print the information that you are saving on that class.
The class is just a way to save this information in a place (session) in a proper manner. If you aren't planning to pass this information to request, session or context, the class isn't really needed.
Of course you can use a TreeMap with Vector (or List) values, but i don't see the need to use it (mantaining all user information in context????, maintaining an historic of user input???). In this case, you just need to save in the TreeMap the array of ints (no vector, nor List).
TreeMap tr = new TreeMap();
String userName = XXX;
int [] userInput = int [] {1,2,3,4};
tr.put(userName,userInput)
...
int [] result = (int [])tr.get(userName);