I have written this code is JSP
public boolean connection()
{
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.j ndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://ad.infosys.com:389");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, userid+"@ad.ghd.com");
env.put(Context.SECURITY_CREDENTIALS,pwd);
and when I m trying to run it i m getting the following error
org.apache.jasper.JasperException: Unable to compile class for JSP
illegal start of expression
public boolean connection()
^