In a recent publication [E. Y. Petrov and A. V. Kudrin, Phys. Rev. Lett. 104, 190404 (2010)], a method for constructing exact axisymmetric solutions of the Maxwell equations in a nonlinear nondispersive medium has been put forward. In this Brief Report, we will use the proposed method to deal with problems of wave propagation in an inhomogeneous nonlinear and nondispersive medium. The inhomogeneous factor is chosen in the form as r(β), where β is a certain constant. By solving the Maxwell equations an exact axisymmetric solution is obtained, starting from the corresponding solution of linear field equations, to describe the propagation of cylindrical electromagnetic waves in the medium. In the limit β→0, our solutions go into a nonlinear but homogeneous case, which is the same as prevenient results. We analyze the initial value problem and boundary value problem, to compare the differences between homogeneous and inhomogeneous conditions. It is found that the amplitude and frequency of the electromagnetic wave can be controlled with different β. Our results can be used for analysis of inhomogeneous ferroelectric resonators.