• Post Reply Bookmark Topic Watch Topic
  • New Topic

in server.xml how to make change in "Host" tag  RSS feed

 
Gaurav Chhabras
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have make an application, now what i want is that if someone write www.abcxyz.com on his browser then he will be redirected to my application.

I want that instead of writting http://localhost:8080/myApplication/first.jsp

user will type www.abcxyz.com and then redirected to the above link that is -:

http://localhost:8080/myApplication/first.jsp

I have a hunch that there is something to do with <Host> tag.
Please tell me that how to do that.

Please help, it is urgent.

Thanks
Regards
Gaurav
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a little more to it than that.

Do you have that domain name registered or do you have a DNS server running in your subnet?
 
Sachin Dimble
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gaurav!
But if don't have DNS server register(i know u don't have) u can't access u r application using this kind of request insted u can access by making the request with IP address like-
http://192.XXX.XXXX.XX/index.jsp

With Best Regards,

Sachin!
 
Gaurav Chhabras
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am heartly thankful for your replies.

So could you please tell me that whats the use of <Host> tag in server.xml.

Is there not anyway that with the help of server.xml <Host> tag i can be able to do the above thing.

Thanks
Regards
Gaurav
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The host tag allows you to instruct Tomcat to listen for requests made to a particular domain (as opposed to all request sent to that machine ort which is the default) but you would still need some form of DNS to direct requests to that machine in the first place.
 
Sachin Dimble
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excatly Ben! And can i access my application (which will be hosted on my m/c with my tomcat)with the only IP address of my m/c from the Internet(not intranet because it's possible i tried.) instead of DNS server.

Thanx & Regds,
Sachin!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!