I know how to set up an apache server with ProxyPass. so that a client can connect to a specific url, is redirected to another url but does not recognize this, as his entered url just remains.
Do I have to use a apache proxy for this? Or can I somehow achieve the same result with a Servlet? Especially the forwarding without changing the browser url, so the user still thinks he directly accesses the server?
There are probably lots of Proxy Servlets available, some with probably a richer feature-set than Apache's ProxyPass. But you usually want to have a robust server sitting in front of your servlets which is why people setup something like Apache and use ProxyPass to proxy requests to a local (or internal) servlet engine.
You don't need to use Apache. For example, you can use NGinx's ProxyPass to do pretty much the same thing. There's also other modules besides Apache's mod_proxy to do this if you're concerned about load balancing.