public static boolean isJavaScriptEnabled(HttpServletRequest request){
  HttpSession session=request.getSession();
  Boolean javaScriptEnabled=(Boolean)session.getAttribute("javaScriptEnabled");
  if (javaScriptEnabled != null) {
    return javaScriptEnabled.booleanValue();
  }
  return false;
}

public static boolean isJavaScriptEnabled ( HttpServletRequest request ) { HttpSession session = request . getSession ( ) ; Boolean javaScriptEnabled = ( Boolean ) session . getAttribute ( "javaScriptEnabled" ) ; if ( javaScriptEnabled != null ) { return javaScriptEnabled . booleanValue ( ) ; } return false ; }
returns true if the user has javascript enabled .
