Welcome to the Ranch, Haider!
We have a "Code" button on our message editor that can insert special Code Tags into the text you are editing. They can make pre-formatted text such as
Java code and XML easier to read. I've added them to your post.
Your first error was in attempting to obtain the country list via a static reference from the country. Web applications are by nature, multi-user and static items are by nature single-user unless they are constant. But even in that case, it's generally preferable to store the shared item as an Application Scope object.
Your second "error" was in using brute-force scriptlet code on your JSP. A much tidier way of doing this is to use the Java Standard Template library (JSTL). The JSTL
forEach tag can iterate over a sequential collection and retrieve each element in that collection as a loop variable. From there, you can simply use
JEE Expression Language (EL) to read the element's properties. That is, instead of "x.getKey()", the EL equivalent is simply "x.key".
Scriptlets are virtually obsolete these days. Using stuff like JSTL/EL is simpler, more elegant, and less prone to bugs.