  In this paper, we apply the geometric Hamilton--Jacobi theory to obtain
solutions of classical hamiltonian systems that are either compatible with a
cosymplectic or a contact structure. As it is well known, the first structure
plays a central role in the theory of time-dependent hamiltonians, whilst the
second is here used to treat classical hamiltonians including dissipation
terms.
  The interest of a geometric Hamilton--Jacobi equation is the primordial
observation that if a hamiltonian vector field $X_{H}$ can be projected into a
configuration manifold by means of a 1-form $dW$, then the integral curves of
the projected vector field $X_{H}^{dW}$ can be transformed into integral curves
of $X_{H}$ provided that $W$ is a solution of the Hamilton--Jacobi equation. In
this way, we use the geometric Hamilton--Jacobi theory to derive solutions of
physical systems with a time-dependent hamiltonian formulation or including
dissipative terms. Explicit, new expressions for a geometric Hamilton--Jacobi
equation are obtained on a cosymplectic and a contact manifold. These equations
are later used to solve physical examples containing explicit time dependence,
as it is the case of a unidimensional trigonometric system, and two dimensional
nonlinear oscillators as Winternitz--Smorodinsky oscillators. For explicit
dissipative behavior, we solve the example of a unidimensional damped
oscillator.
