I'm working on Java code setup in eclipse.created a dynamic web project.
I'm running the project via Apache tomcat server 6.0. able to run the code without any issues. But when I run the code the login page displays with the URL (local host:8080/example) after entering the logging in the URL is directed to (http://local host/example/home.jsp) and says page not found check the local host is correct .the same I'm able to access by manually entering port number in URL like (local host:8080/example/home.jsp.
The problem is if URL with port number it is working fine. But when page switches the URL is coming without port number.
Not able to access: localhost/example/home.jsp Able to access: localhost:8080/example/home.jsp
Could you please let me know any server configurations I need to setup so it will automatically the port number is displayed when I switch the page.
Thanks
Try running the below command and load the application.
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080