We have a couple of utility functions declared at the class level in jsp. Use <%!.
I get the following error on a 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 delete two variables, our functions will start working. But they were there before, and it worked correctly.
What causes the error?
source
share