This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi friends, I have wrote a program in JSP. I called that JSP from a HTML file in which i have created one list <select> with multiple selection mode. while i tried to get and print the selected values of that list using request.getParameter('listName'), it prints all the selected items of that list in a single line only. I want to print all those selected items line by line. Plz help me in this regard. Thanks in advance, Anbudan, K.Jeyaveerapandian
All I can think of at the moment is that you'll need to use StringTokenizer passing in the String you get back from the request and using a space as a delimiter, then use a while(tokenizer.hasMoreTokens()) loop to println each token in turn. There may be a better way but I just can't think of it at the moment.
Pounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.
Jeyaveera pandian, A small change in your code will do I think. Use getParameterValues method . It will return a String array of all values selected. Then you manuplate this String array according to your needs.
regds maha anna [This message has been edited by maha anna (edited December 05, 2000).]