I am using Red Hat Enterprise Linux Server release 5.1 (Tikanga) and apache-tomcat-6.0.35.tomcat install on port 8080 than i change in 80(default) . Using tomcat deploy war file(abc.war) successfully but i want to access this application as (www.abc.com
). plz suggest how to replace index file(ROOT)??
Asked
Active
Viewed 1,228 times
3
-
1http://en.wikipedia.org/wiki/Domain_Name_System – Shurmajee Jan 29 '13 at 06:59
-
yes u r right..i have also a domain but my problem is differ after deploy war file i run application like(ip:80/abc) so i want to change this in www.abc.com. – ruchi Jan 29 '13 at 07:10
-
Do you have a local DNS server? If yes is your machine configured to lookup to your local server? Please give more details in the question – Shurmajee Jan 29 '13 at 07:29
-
and what error do you get on typing abc.com – Shurmajee Jan 29 '13 at 07:45
-
@MayankSharma i have a public ip like(http://74.125.224.72/) ar but my question is this after deploy war file i have to access this ip (www.abc.com) abc is deploy war file. now i am to access like ip:abc – ruchi Jan 29 '13 at 07:49
-
i just ask how to remove/change index file from tomcat(Root folder) ar any other suggestion.. – ruchi Jan 29 '13 at 07:54
-
1http://stackoverflow.com/questions/7276989/howto-set-the-context-path-of-a-web-application-in-tomcat-7-0 – Shurmajee Jan 29 '13 at 08:02
-
You may do it with eclipse. It has remote deployment features. – Roman C Apr 08 '13 at 21:47
-
possible duplicate of [How to remove the project name from domain on cPanel](http://stackoverflow.com/questions/15728330/how-to-remove-the-project-name-from-domain-on-cpanel) – Roman C Apr 09 '13 at 09:34
1 Answers
0
Two things:
- You need to pay for a domain name and point it at your IP address.
- Create (or symlink) your application's .xml file to ROOT.xml in the webapps directory. This will mean you can access the application using '/' as well as '/abc'.

Roman C
- 49,761
- 33
- 66
- 176

Daniel Scott
- 7,418
- 5
- 39
- 58
-
this doesn't provide the answer, it doesn't allow mapping to the specified url. – Roman C Apr 09 '13 at 09:30
-
What do you mean? The DNS entry will set the hostname, and using 'ROOT.xml' will remove the /abc part – Daniel Scott Aug 29 '13 at 13:38
-
How do you want using ROOT.xml in the webapps directory to remove the /abc part? And it doesn't remove as well. – Roman C Aug 29 '13 at 15:26
-
ROOT.xml is a special app name, which is the default for that Tomcat instance and will be loaded when browsing to the root of the tomcat server: https://tomcat.apache.org/tomcat-7.0-doc/config/context.html (search for ROOT.xml) – Daniel Scott Mar 17 '16 at 16:01