We have a couple of utility functions declared on class level in jsp. Using <%!
.
I get the following error in the line containing only <%!
:
Invalid character constant
Code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@page import="java.sql.*"%>
<%@page import="java.util.Vector"%>
<%!
String var1 = "something";
ObjectXXX var2 = null;
void initObjectXXX()
{
...
If I remove the two variables our functions start working. But they were there before and it was working correctly.
What is causing the error?