I want to execute my web app as http://localhost
.
On modern linux the best approach (for me) is to use xinetd :
1) create /etc/xinet.d/tomcat-http
service http
{
disable = no
socket_type = stream
user = root
wait = no
redirect = 127.0.0.1 8080
}
2) create /etc/xinet.d/tomcat-https
service https
{
disable = no
socket_type = stream
user = root
wait = no
redirect = 127.0.0.1 8443
}
3) chkconfig xinetd on
4) /etc/init.d/xinetd start