It may seem simple to you, but it's not. The part you're not thinking about is the network part; the code that opens a socket, listens for a web request, dispatches any requests for processing and simultaneously keeps listening for more requests, deals with sockets that are abruptly closed (because the browser was stopped, etc., etc.
While you may not need a full-blown J2EE server, you do need to either write all the above and more, or use a
servlet container. Tomcat is the most popular, and free.
http://tomcat.apache.org/ Once you have a servlet container running, then you can start thinking about how to populate the content of your web pages.