Possible Duplicate:
Can anyone recommend a simple Java web-app framework?
I want to know about web development with Java. It is very easy to work with PHP and Apache, but I need to use Java.
I have searched for Java web frameworks, but many of them are complex and difficult to configure. I need something as simple as PHP with Apache.
Tomcat and Jetty do not use the port 80, I have to keep a process to redirect connections to another port, and a transfer from a port to another port is inefficient. However, Apache uses port 80 naturally.
There are frameworks that use a complex directory structure with many configuration folders and files. Some of them use the concept of application for each folder. With Apache, it is very simple, because each page is a file in “/var/www/”.
I do not know anything about servlet, JSP, JSF or Java Enterprise Edition. I prefer something that mix static HTML and dynamically-generated HTML in the same file, but if I have to call a Java function many times to output HTML string, it’s ok.
I want to know a simple Java Web Framework. Something to listen the port 80, interpret the HTTP protocol and show the HTML that is generated by the Java code. The OS is Linux (Ubuntu) and I do not use IDE.
Thanks
You can run Tomcat/Jetty on port 80. Just edit the server.xml (for Tomcat). On Unix/Linux port numbers < 1024 are for privileged users so you would need to run tomcat as root.
Also, running Java web apps is a little bit different than using a LAMP (or a similar) stack. You do still need to understand the concept of a Web/Servlet container
http://en.wikipedia.org/wiki/Servlet_container
Familiarize yourself with the a typical structure for a WAR (Web Archive) file. This is no different than learning about how Apache works and familiarizing oneself with basic Apache configuration with working with a LAMP stack.
This is the bare minimum one should do when venturing into Java Web development.
Take a look at web4j http://www.web4j.com/ I have never used it but it looks simplistic enough for your needs and should get you started