Bifurcations and solutions for the generalized nonlinear Schrödinger equation