Josephson vortices and flux penetration in high temperature superconductors