This week's book giveaway is in the Java in General forum. We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line! See this thread for details.
In your SimpleTagDynamic Class you construct your html select Tag.
1. In Line 48 you open the select Tag, but it is never closed. You should close it with /> or </select>
2. In Line 48 there has to be a whitespace after the <select otherwise the html code would look like <selectname='myAttributesName'
And in Line 68 there has to be a whitespace too after the second %s otherwise your html code will stick together like in the example above.
Before: private static final String ATTR_TEMPLATE= "%s='%s'";
After: private static final String ATTR_TEMPLATE= "%s='%s' ";
In your SimpleServlet you fill your colorList and set it as an Context Attribute, but the Servlet is never invoked (Your html form has the action Dynamic.do), therefore the attribute is never set and when you try to get the optionsList in the SimpleTagDynamicClass you will get the NullPointerException.