Applications of Ekeland's principle to locally Lipschitzian functionals