We prove Freidlin-Wentzell type large deviation principles for various rescaled models in populations dynamics that have immigration and possibly harvesting: birth-death processes, Galton-Watson trees, epidemic SI models, and prey-predator models.The proofs are carried out using a general analytic approach based on the well-posedness of a class of associated Hamilton-Jacobi equations. The notable feature for these Hamilton-Jacobi equations is that the Hamiltonian can be discontinuous at the boundary. We prove a well-posedness result for a large class of Hamilton-Jacobi equations corresponding to one-dimensional models, and give partial results for the multi-dimensional setting.We start with a collection of preliminary properties of L, L and their Legendre duals.Lemma 2.11. Let {H J } J∈J(E) be a generating set of Hamiltonians.(a) For each x ∈ E the map v → L(x, v) is the convex hull of the Lagrangians v → L J (x, v), i.e. the largest convex function that lies below all L J 's;H ‡ (y, ∇f(y)), establishing (5.3).Step 2: We construct a solution to the differential inclusion (5.2), for which we use Lemma D.4. Note that the Lemma assumes growth bounds on the size of F f , that are not necessarily satisfied.