You don't need Java on the server side just because you have Java on the client side, but if you wanted to go that route, you'd install a Servlet/JSP server such as
Tomcat or WebLogic and have Apache pass the requests to it.
The Java sandbox rules allow you to open a URLConnection inside an applet, but that URLConnection must connect to the same server that the Java applet was loaded from. Anything more than that WOULD require setting up security privileges and applet signing.
Note that if an applet connects to a server, there's no reason why the output has to be in the text/html MIME format, since this is just a program tansferring data, not a web browser.