Tomcat question - running tomcat webapp from root

Discussion in 'Java' started by Sean Berry, Dec 18, 2005.

  1. Sean Berry

    Sean Berry Guest

    I have tomcat 5, apache 1.3, mod_jk

    I have a desire to have a webapp currently under /TOMCAT_HOME/webapps/myapp

    Then, to view this I can go to:
    www.mydomain.com/myapp

    Since the entire content of this domain is written in java I don't want to
    have it running under a subdirectory like this...

    Is there a way to get tomcat/apache configured to run the entire
    www.mydomain.com domain as a webapp?

    Sorry if there is a better place to post.
     
    Sean Berry, Dec 18, 2005
    #1
    1. Advertising

  2. Sean Berry

    Tim Terry Guest

    Sean Berry wrote:
    > I have tomcat 5, apache 1.3, mod_jk
    >
    > I have a desire to have a webapp currently under /TOMCAT_HOME/webapps/myapp
    >
    > Then, to view this I can go to:
    > www.mydomain.com/myapp
    >
    > Since the entire content of this domain is written in java I don't want to
    > have it running under a subdirectory like this...
    >
    > Is there a way to get tomcat/apache configured to run the entire
    > www.mydomain.com domain as a webapp?
    >
    > Sorry if there is a better place to post.
    >
    >

    So solve this deploy the application in the 'ROOT' context.
    In your case expand your war file to /TOMCAT_HOME/webapps/ROOT

    Tim
     
    Tim Terry, Dec 18, 2005
    #2
    1. Advertising

  3. Sean Berry

    Sean Berry Guest

    "Tim Terry" <> wrote in message
    news:43a5e13f$0$29578$...
    > Sean Berry wrote:
    >> I have tomcat 5, apache 1.3, mod_jk
    >>
    >> I have a desire to have a webapp currently under
    >> /TOMCAT_HOME/webapps/myapp
    >>
    >> Then, to view this I can go to:
    >> www.mydomain.com/myapp
    >>
    >> Since the entire content of this domain is written in java I don't want
    >> to have it running under a subdirectory like this...
    >>
    >> Is there a way to get tomcat/apache configured to run the entire
    >> www.mydomain.com domain as a webapp?
    >>
    >> Sorry if there is a better place to post.

    > So solve this deploy the application in the 'ROOT' context.
    > In your case expand your war file to /TOMCAT_HOME/webapps/ROOT
    >


    Thanks for the response. I thought about doing this, but I run other
    existing webapps for other domains on the same server.

    Any more ideas? Or perhaps I don't fully understand what you are suggesting.

    Thanks
     
    Sean Berry, Dec 19, 2005
    #3
  4. Sean Berry

    Tim Terry Guest

    Sean Berry wrote:
    > "Tim Terry" <> wrote in message
    > news:43a5e13f$0$29578$...
    >
    >>Sean Berry wrote:
    >>
    >>>I have tomcat 5, apache 1.3, mod_jk
    >>>
    >>>I have a desire to have a webapp currently under
    >>>/TOMCAT_HOME/webapps/myapp
    >>>
    >>>Then, to view this I can go to:
    >>>www.mydomain.com/myapp
    >>>
    >>>Since the entire content of this domain is written in java I don't want
    >>>to have it running under a subdirectory like this...
    >>>
    >>>Is there a way to get tomcat/apache configured to run the entire
    >>>www.mydomain.com domain as a webapp?
    >>>
    >>>Sorry if there is a better place to post.

    >>
    >>So solve this deploy the application in the 'ROOT' context.
    >>In your case expand your war file to /TOMCAT_HOME/webapps/ROOT
    >>

    >
    >
    > Thanks for the response. I thought about doing this, but I run other
    > existing webapps for other domains on the same server.
    >
    > Any more ideas? Or perhaps I don't fully understand what you are suggesting.
    >
    > Thanks
    >
    >


    you will still be able to run other webapps on the same server in other
    contexts. However, only one application can run in the root context per
    host element. If you need more than one application to run in the root
    context you could either create a new virtual host and deploy one
    application under each. Or sit apache in front of tomcat and do some URL
    rewrite trickery.

    Tim
     
    Tim Terry, Dec 19, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    434
    S. Justin Gengo [MCP]
    Feb 10, 2006
  2. =?Utf-8?B?YmVub2l0?=

    Root of WebApp

    =?Utf-8?B?YmVub2l0?=, Feb 24, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    393
    =?Utf-8?B?YmVub2l0?=
    Feb 24, 2006
  3. James Yong
    Replies:
    18
    Views:
    934
    Dennis Willson
    Dec 2, 2005
  4. Replies:
    1
    Views:
    442
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Jun 3, 2007
  5. Andrew
    Replies:
    7
    Views:
    419
    Andrew
    Jun 28, 2009
Loading...

Share This Page