I am trying to learn web programming using Java, and I ran into bunch of frameworks which supports servlet to create webpages, such as Jetty and Apache Tomcat.
If I wanted to create a web page that has one button(not text), is Jetty/Tomcat required? From what I read, it seems all tutorials uses Jetty/Tomcat and servlet to create even a simple text based webpage.
If all I wanted my server to do was to accept incoming connection and display a button on the webpage(for example, user would just type hhtp://1.1.1.1:8080 and a webpage with a button will show up), is Jetty or Tomcat still required? Can I do it without them?
If so, is there an example for it?
As iNan points out, Apache HTTP is enough for plain HTML.
However, I think you are referencing Java website in its simplest form. If that so, try writing Java Servlet. A servlet is simply an entry point for HTTP response and request. Servlet in its simplest form looks something like this:
(copied from http://www.mkyong.com/servlet/a-simple-servlet-example-write-deploy-run/)
Obviously there are several other stuff needed to be setup in the process (refer to the link above), but this is the simplest one. If you want to make a more complex Java-based website, you can use JSP (Java Server Page).
Hope this will help.