We use Galerkin approximations to show the existence of solution for a class of elliptic equations on bounded domains in \(\mathbb {R}^2\) with subcritical or critical exponential nonlinearities. We are able to solve the problem under more general assumptions usually assumed in the variational the approach, but not in our paper.KeywordsDirichlet problemGalerkin approximationTrudinger–Moser inequalityExponential growthConformal geometry