Hello everyone,
I have been trying to launch my JSP web application using Tomcat using my laptop as the server, with little success. I have registered a DNS at dynDNS.com ( free DNS, anyone!), made my IP static, forwarded port 8080 and port 80. The only problem I believe is telling Tomcat about the DNS alias. I am able to use Tomcat server to deploy the web app locally but not on the internet. I found some articles that suggested editing of server.xml in Tomcat's /conf directory. This too did not help (Probably I didnt write the right code!).

Please help,
Thanks in advance,
Sriram

Hello everyone,
I have been trying to launch my JSP web application using Tomcat using my laptop as the server, with little success. I have registered a DNS at dynDNS.com ( free DNS, anyone!), made my IP static, forwarded port 8080 and port 80. The only problem I believe is telling Tomcat about the DNS alias. I am able to use Tomcat server to deploy the web app locally but not on the internet. I found some articles that suggested editing of server.xml in Tomcat's /conf directory. This too did not help (Probably I didnt write the right code!).

Please help,
Thanks in advance,
Sriram

These are the questions you have to ask to your web-host service provider.
Had you setup nameserver IP? Have you own a private apache and private JVM? What about the heap size? You have to prepare war file to deploy your application.

Have you checked whether your domain name has been registered correctly with your IP Address,
To try that just

ping www.yahoo.com

Just replace www.yahoo.com with your address.

If in the output your static IP Address is displayed, that means the web address is being forwarded correctly to your IP Address and no issues there, if not then you better contact with whoever you got the address registered, or maybe your DNS server's cache needs to be refreshed (in this case you could use OpenDNS, as they allow you to refresh their cache).

The second thing you mention is you have forwarded ports 8080 and 80. By default "tomcat" tends to run on port 8080 and most ISPs tend to block this port from receving outward traffic (as 8080 is an intranet port), Try running Tomcat on port 80 to see if this gets resolved.

@adatapost
The O.P. is pretty clear that he is using his own laptop for hosting, so webhost-service provider, private JVM, private Apache (whatever you mean by private) etc do not come into play.

Hello there,
I tried pinging with DNS. Its doing fine, showng my local IP. I must add that I am trying to host my own website on my laptop by deploying a war file in Tomcat's webapps folder. The problem is that I am not able to configure Tomcat to associate the war with the DNS. And I have tried making Tomcat use port 80 and port 8080. I would also like to cite an example here - to test the integrity of everything but Tomcat, I used Apache HTTP Server to successfully host an HTML file through the DNS I created using my laptop. However, Tomcat is not as easily configurable as Apache HTTP Server and the latter cant run JSP or WAR files.

Please continue your invaluable help,
Thanks in advance
Sriram :)

Can show me exactly how you are trying to call your web page via the web adress you have registered ? or maybe a printscreen so we can see what error you are getting ?

Also just in case you might be interested there is connector called as mod_jk using which you can forward requests received on the Apache web server to your Tomcat.

Hello there,
I have assigned a DNS alias name ramu.dnsalias.com (obtained from dyndns.org) to my local ip address. Added the same to hosts file in %WINDOWS%/System32/Drivers/etc/. Then I modified server.xml in Tomcat/conf to use port 80. Followed this up with adding "<alias>ramu.dnsalias.com</ailas>" under the <host> tag in the same file. Next up I try to open ramu.dnsalias.com - I get the index.html file which is pre-loaded in Tomcat. Further, I added my .war(the exact file name is - om.war) file to the Tomcat/webapps folder and used ramu.dnsalias.com/om. This works on my laptop but people accessing from other places get nothing on their screen. Just a blank page, no errors and the status saying "Done". As for mod_jk, I will certainly try it out and revert back.
Thanks
Sriram

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.