Hi All
I have just worked out the Beer selection example from the book. I compiled the relevant classes (BeerExpert and BeerSelect) in JDK1.5 environment (book recommends 1.5 or above) and
Tomcat 5.5. When I submit form1.html, there is a
JSP compilation error on result.jsp. I know that it could be to do with Generic types, but I have set-up the environment as per the recommendation in the book. I would much appreciate you can help me to resolve the issue. Please find the error message below:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 9 in the jsp file: /result.jsp
Type mismatch: cannot convert from Object to List
6: <p>
7:
8: <%
9: List styles = request.getAttribute("styles");
10: Iterator it = styles.iterator();
11: /*for (
String s : styles) {
12: out.print("<br> try:"+s);
Thanks
Giri