• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

tomcat to host only my app

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in production I want to tomcat to host only my app is accessible at www.mycompany/artms but when I try www.mycompany I get the default tomcat home page how to disable this ?

I want only my app and no other aps.
Please advice me.

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obviously, your app must take the place of the default in the ROOT directory and you must remove all other directories under webapps.
 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

William Brogden wrote:Obviously, your app must take the place of the default in the ROOT directory and you must remove all other directories under webapps.



I still want it to be accessed with /artms not just www.dnsname/artms not just www.dnsname ?

If I place it in root there wont be context root right ?
 
Bartender
Posts: 20827
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

srini carry wrote:
If I place it in root there wont be context root right ?



the ROOT directory is mapped to the context root.


I still want it to be accessed with /artms not just www.dnsname/artms not just www.dnsname ?



I don't understand this, but it sounds like you want to make the domain name part of the URL be optional. The domain (server) name is not optional. If omitted, it defaults to "localhost".
 
Saloon Keeper
Posts: 5559
143
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do a client-side redirect from www.mycompany.com to www.mycompany.com/artms
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I still want it to be accessed with /artms not just www.dnsname/artms not just www.dnsname ?

If I place it in root there wont be context root right ?



Right - If you want there to only be one web application on your server then "artms" must be the only directory under webapps, right? So remove ROOT, leave artms, and let us know what happens.



Bill

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

William Brogden wrote:

I still want it to be accessed with /artms not just www.dnsname/artms not just www.dnsname ?

If I place it in root there wont be context root right ?



Right - If you want there to only be one web application on your server then "artms" must be the only directory under webapps, right? So remove ROOT, leave artms, and let us know what happens.



Bill



when I type localhost:8080 I get a blank page.
and when localhost:8080/artms my app.
but no errors .
 
Tim Moores
Saloon Keeper
Posts: 5559
143
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:You can do a client-side redirect from www.mycompany.com to www.mycompany.com/artms


Let me amend that: You need to do a client-side redirect from www.mycompany.com to www.mycompany.com/artms. Something like this in your index.html should do the trick (provided index.html is set up as the default file):

<meta http-equiv="Refresh" content="0; URL=http://www.mycompany.com/artms">
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!