I am using Tomcat 3.2.3 and servlet api 2.2 (probably doesn't matter with this question though). I developed a servlet and tested it out on my machine with the localhost:8080 reference. Then I wanted to view it on another machine. But started to get errors. Then I thought about it and couldn't help but wonder if my only having a dynamic IP address would effect the servlet. ie the 'other' computer may not find the needed method every time. It will show the main page, but further pages that use redirection and/or url rewriting don't work. This is a problem since I am using a lot of forms and that is what is being killed. When I switch back to localhost and my computer everything is good again. I'm probably missing something simple in all this. Any ideas? I am supposed to fully test it running on my machine before it is deployed to a 'real' server. (I say 'real' server since they only let me have a W95 machine with 64mb But I will get it) Thank you, Tom
if my only having a dynamic IP address would effect the servlet. Nope, having a Dyn IP address is NOT the problem. ie the 'other' computer may not find the needed method every time. It will show the main page, but further pages that use redirection and/or url rewriting don't work Couple of this that strike me.... 1. After the main page shows up, and you do something else watch your Tomcat window for exceptions etc. These may give you more data to debug your appln. 2. I am not sure of this, but I will say it anyways, (sorry)... When you are re-writting the URL are you hardcoding to localhost server instead of getting it from the request....just asking. Let us know a little more on this and hopefully someone could help. regds. - satya
It sounds like you have accomplished more than I have thus far! Can you look at my post "Tomcat installation on Windows2000 Server" and offer some assistance? Oracle's web server 4.x did not work with DHCP. I guess TomCat has figured out a way around that?
Joined: Jun 26, 2001
Madhav, I am curious about your suggestion on item #2. I have used both the localhost during testing, and then the IP address when working with other computers. Your comment leads me to believe that you are inferring to another way to redirect with the req. Could you explain that? Tom
usually you would encode links as relative rather than absolute. So all your URLs should look like href="index.jsp?blah=glah" the browser will then look for index.jsp in the same directory as the page that it is currently showing. You can even use filepath like strings to move around your site relative to the page that is currently in the browser window. An example is: say you are showing a form that is in a folder called forms: the URL for your form is http://myserver/forms/myform.jsp and you want a "back" link that goes to the home page. You can either have the link href="/" which will direct the browser to the root of site or http://myserver. You can use href="../somepage.jsp" which will direct the browser to a file called somepage.jsp in the folder above the current one. etc, etc if you use links that are like this: href="http://mycomputer/index.jsp?etc=etc" then you are tying your application to an exact structure. If you want to move anything you get stuck in massive maintenance. chanoch
chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
Joined: Jun 26, 2001
Ok, so it is like the relative paths when accessing the hard drive. I am familiar with that since I have done some application programming in Java. Thanks for the help. Tom
DHCP and webservers don't generally go well together. Prior to Windows 2000, the LAN name of the server was NOT resolvable via TCP/IP the way Unix hostname would be - Windows Networking didn't depend on DNS - its primary name resolution was Microsoft-proprietary. This changed some in Win2K, but I don't know how much. At ALLTEL we didn't buy into Windows 2000 because we were a large IBM mainframe shop with lots of token-ring NICs and Windows 2000 didn't have drivers for them, so I'm speaking from what I've heard rather than what I've seen. At any rate, the easiest (technically, if not politically) solution is to lock down the IP address of your server and set it up in DNS.
An IDE is no substitute for an Intelligent Developer.