Fix swagger-ui under servlet context

Servlet contextes work differently as I presumed. Updated tests and
fixed implementation.