Kyle
Kyle

Reputation: 4298

Where to set Tomcat project's webservices url?

If I go to http://web-server:port/myProj/services my web services are listed there. However, I need them to be available at http://myProj:port/myProj/services (for example if myProj is called kylem and on the default port I'd see my services listed at http://kylem:8080/kylem/services). How do I change it to get the url I just mentioned?

edit:

Hoping someone can provide some advice for more places to look. As described below, someone had previously set up Apache Tomcat so that the url I described above already (http://projName/..) works. But I cannot figure out how/why it works. The only tag in my Tomcat/conf/server.xml file just has

<Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true">

It also has a tag in it, but that seems unrelated. Is there anything else that could possibly be set up to allow the use of http://projName instead of http://server-name?

Upvotes: 1

Views: 709

Answers (1)

Bozho
Bozho

Reputation: 597234

Set them as aliases to the current host in server.xml

<Host name="foo.com" appBase="/var/www/app" 
    unpackWARs="true" autoDeploy="true">
         <Alias>bar.com</Alias>
         <Alias>baz.com</Alias>
</Host>

Upvotes: 2

Related Questions