So for example, if my project name is WebApp and my domain is www.google.com, when running locally I have to type in www.google.com/WebApp. That's not super easy for clients, so I was wondering if there is a way to direct to a home page when typing in www.google.com? Any tips appreciated.
Asked
Active
Viewed 42 times
1 Answers
-1
Where are you deploying? To get to www.google.com
you have to deploy to the root context or point the root to where you deployed.
Deploying my application at the root in Tomcat
You have a couple of options:
Remove the out-of-the-box ROOT/ directory from tomcat and rename your war file to ROOT.war before deploying it.
Deploy your war as (from your example) war_name.war and configure the context root in conf/server.xml to use your war file :
The first one is easier, but a little more kludgy. The second one is probably the more elegant way to do it.
-
1Good question, I suppose I haven't landed on that yet. Still developing the website, but I was just curious if it's possible before moving forward with this format. I'll check out deploying to the root context thank you. I just don't want to have someone type in the url /projectname, that way it's easier for their customers. – stratg5 Sep 21 '16 at 01:27