where Ø is a smooth bounded domain of R with external normal ν, N ≥ 3, 1 < p < (N + 2)/(N − 2), J : R → R and V : R → R are C functions. In [5], the first author, extending the classical results by Ni and Takagi, in [3, 4], proved that there exist solutions of (1) that concentrate at maximum and minimum points of a suitable auxiliary function defined on the boundary ∂Ø and depending only on J a...