by troels · 12y ago · 0 comments
apt-get install php5 apache
echo "<html><body>Hello World</body></html>" > /var/www/index.php
The end.A Java app can be written similarly:
apt-get install tomcat7
echo "<html><body>Hello World</body></html>" > /var/lib/tomcat7/webapps/ROOT/index.jsp
(This is untested as I don't have an Ubuntu box at hand – the locations depend on your distro, as with Apache installs.)There actually are sane people in the Java community – underneath the "Java EE" overcomplexity there are some regular old Java web frameworks that are pretty simple and robust. Unfortunately they can be easily overlooked, as the EE community is loud.
apt-get install php5
echo "<html><body>Hello World</body></html>" > /var/www/index.php
php -S 127.0.0.1:8080 /var/www/ apt-get install apache
echo "<html><body>Hello World</body></html>" > /var/www/index.html