How to specify a dynamic ip address in place of localhost:8080 when accessing a webpage

Posted on 2003-02-27
Medium Priority
Last Modified: 2010-03-04
Hello everybody,

I am newbie to the web development thing and I am anxious to explore this world. So I was happy to resolve many issues with loading servlets and jsps and get them up and running no problems at all. However, now what I was trying to do in the past days is to be able to access the jsp without the need to say localhost:8080 as part of the URL. I would like also to access the jsp from outside. My host is behind a linksys router and I have got a DHCP meaning that the IP address I get is dynamic so I dont have a local ip address. So I dont know what is the current ip address to use it in place of the localhost:8081. How can I know the current Ip address ? And assuming I got to know the ip address, would it be possible for others to be able to access my jsp on my host ?

My operating system is windows 98 and modem is DSL. Tomcat server is 4.1

Please help and thanks a lot in advance.

Question by:a7hla3alam

Accepted Solution

zshipley earned 200 total points
ID: 8038419
To answer the first part of your question, there are many sites out there that can tell you your current dynamic ip.  Here is one: http://www.ipmonster.com

Hope that helps a little.

Expert Comment

ID: 8038483
Also.... yes, if you enter the IP that ipmonster displays, you will be able to hit your server.  The problem, of course, is that the IP changes every once in a while.  If you need a name rather than an IP to remeber every time you hit your server, there is a service called No-IP that can take care of that for you, too.  Try it out here: http://www.noip.com
LVL 15

Expert Comment

ID: 8040656
hi a7hla3alam,

a portion of the solution is given by zshipley.

The 2nd part of the problem could be solved by using dynamic reference in your HTML (or JPS) code.  For example, rather than using <a href=http://server:8080/path/stuff.html>, you could do a <a href=/path/stuff.html> In other word, try to use relative link.

This approach would take care of dynamic IP changes case.  People would still need to know the "entry" point to your website, but from there, the links should be relative.

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Expert Comment

ID: 8043631

You aren't running apache or IIS ?

If not either consider running apache, there should be alot of documentationas how to get apache to forward all files ending with .jsp to the tomcat server.

Or edit the configuration file for the tomcat server and where you have an entry for your site, chnage the port to 80, instead of 8080.

Comment out any other references to port 80 if they exist in the tomcat server conf.

If you are developing on same machine you rin tomcat on you can also do like this:


To find out your current IP:
w9x & ME: start->run->winipcfg
nt,w2k,xp: start->run->cmd

To see WINS, DNS servers and more: ipconfig /all

www.dyndns.org, will also be able to set an external name to your dynamic IP.

/Hans - Erik Skyttberg

Author Comment

ID: 8045153
Hello Everyone,

I would like to thank all of you who responed to my help. Everything worked perfectly fine now. Thanks a lot for your time and effort. Basically, what i did, is I first went to ipmonster where I figured out the ip I am using and then replaced the localhost:8081 with the obtained ip address:8081 like http://ipaddress:8081/... It didnt work. So I read much about linksys router via google and all talk about port forwarding thing. I mean router by default doesn't allow access to my host from outside unless its in response to an initiated request from my machine. However u can indicate to the router that you would like to permit external access to my host and you can specify which port you allow access too. So I went to roiuter configuration and from there, I went to forwarding page and enabled port 8081 of my machine. Then I called a friend to try the url above, and I was very glad to see it flying :) It worked !! :) Thanks too much once again for your kind attention and help ...

Have a good night
LVL 15

Expert Comment

ID: 8051731
hi a7hla3alam ,

Since the problem is "practically" solved, this is the time to close the question.  Please find the comments that helped you most, and award them accordingly.  If you feels that more that one member has helped, you can either split the pts, or award them separately.  

You could the Moderator in Community Support (or here) if you need assistance.


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question