Allowing access to localhost outside network
You need to check the following, in roughly this order:
Local Computer:
-
Firewall: Allow incoming connections on the required port.
-
Server: I've not used Tomcat, but you should ensure it is configured to allow connections from other IP addresses, it may be configured to only work locally.
At this point, it is worth testing that you've got this right by connecting to the LAN IP of this computer from another machine on the same LAN. Otherwise you risk spending a lot of effort messing around in the later steps to find this is blocking the entire process
Local Router:
-
Port Forwarding: Forward all inbound connections to the required port on to the IP of the local computer with the same port*. This is easier if the local computer has a fixed IP, but will work if it is DHCP but requires a little more caution (you just might have to check the configuration each time).
**This isn't strictly necessary, you could have external port 80 forwarded to the relevant port, allowing the third party to use just the IP address, and not have to use the port in the URL.*
Internet Connection
- Port Blocking: Some ISPs block inbound ports to prevent home users from using a (cheaper) home connection for business purposes. You could try a non-standard port number to see if this helps.
Third Party:
-
Connection: You need to give them your WAN IP address, your router should be able to tell you what this is. Otherwise, try something like http://whatismyip.com/ to find out what you IP is.
They then need to visithttp://<IPAddress>:<port>/
I'll assume that the website isnt live, because otherwise, well we wont get into that. Easiest way to show him your project is to have netbeans compile the latest working model, find the folder all the info is stored in, zip that puppy up, upload it to any one of a plethora of file hosting sites, and give him the link, if you want him to be able to fully test the site. when he gets the file, have him open up Websitename.htm(l) and he can literally browse it like its live.
if you just want him to be able to look at what you're doing, take a few screenshots and email them to him.
You need to do a number of things:
- Ensure that you can reach the site from another computer on the LAN
- Configure the computer running Tomcat to have a fixed IP address on your LAN
- Forward the required port(s) from your router to the fixed IP of the Tomcat server
- Optionally use DynDNS's Dynamic DNS service to allow this person to find you when your WAN IP changes
If you go down the DynDNS route they have their own SE site where we can give you lots of help in getting things working.
To avoid re-writing the entire thing, I'll direct you to this guide on the DynDNS community site.
The first part should be simple enough. Can you connect to the LAN IP of the Tomcat server, using a web browser?