Stacktrace:] with root cause
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 8 in the jsp file: /index.jsp
sb cannot be resolved to a variable
5: <jsp:useBean id = "sb" class="java.lang.StringBuffer" />
6: sb.append("Hello");
7: <%}%>
8: <%=sb%>
himaiMinh wrote:FYI, I tried to run this code.
I got this error:
Stacktrace:] with root cause
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 8 in the jsp file: /index.jsp
sb cannot be resolved to a variable
5: <jsp:useBean id = "sb" class="java.lang.StringBuffer" />
6: sb.append("Hello");
7: <%}%>
8: <%=sb%>
Looks like the exact words in the error message have changed between the versions of tomcat but the meaning is the same. sb is undefined or cannot be resolved.
-Paul.
If you like our products and services, please help us by posting your review here.