?
Solved

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

Posted on 2003-02-27
6
Medium Priority
?
278 Views
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.

0
Comment
Question by:a7hla3alam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Accepted Solution

by:
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.
0
 

Expert Comment

by:zshipley
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
0
 
LVL 15

Expert Comment

by:samri
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.

cheers.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 8

Expert Comment

by:heskyttberg
ID: 8043631
Hi!

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:

http://myComputerName:8080

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

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.

Regards
/Hans - Erik Skyttberg
0
 

Author Comment

by:a7hla3alam
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
0
 
LVL 15

Expert Comment

by:samri
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.

cheers.
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

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…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

764 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