Hi All,

I am building a "State Option List" and my current implementation has the US States as 
a String Array and I build a String using the elements of this String Array. I use a 
JspWriter to write this String to the output.

Here is a sample code that appends the array elements to a string buffer -

String s = STATES[i];
           
stringbuffer.append("<option value=\"");
stringbuffer.append(s);
stringbuffer.append("\"");

But, I am embedding HTML in Java. Is there a better way of doing this? Any suggestions 
will be greatly appreciated.

Thanks, -k

 



---------------------------------
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

Reply via email to