hey guys,
I'm realtively new to jsp, and I want to create java objects and use them later in the jsp code.
Here's what I do:
<%!
public static java.util.List attrTypesArray = new java.util.ArrayList(50);
public static boolean myBool;
attrTypesArray.add("aaaa");
pageContext.setAttribute("attrTypesArray", attrTypesArray);
pageContext.setAttribute("myBool", myBool);
myBool = attrTypesArray.contains("aaaa");
%>
<c:out value='${myBool}'/>
However, I get errors of the sort:
Unable to compile class for JSP:
An error occurred at line: 65 in the jsp file: /file.jsp
Syntax error on token(s), misplaced construct(s)