deploy webapp from Eclipse to Tomcat root context

后端 未结 5 1717
后悔当初
后悔当初 2020-12-02 15:20

I deploy a .war application from Eclipse by adding the \"Dynamic Web Module\" facet, then right-clicking on the project and selecting \"Run As -> Run on Server\".

Th

5条回答
  •  一生所求
    2020-12-02 16:00

    In the Web Project Settings for the project, set the Context root to "/". (Without quotes)

    Just in case you are using apache2 with mod_proxy. In my virtual host definition I have a Location entry for the root context:

      
        BalancerMember ajp://localhost:18009 route=s1
        BalancerMember ajp://localhost:28009 route=s2
      
    
      # A "Location" entry for hosting static content.  Would put mod_expire settings
      # here
      
        ProxyPass !  #Don't proxy this location
        ExpiresActive on
        ExpiresDefault "access plus 1 seconds"
        ExpiresByType application/javascript "access plus 1 months"
      
    
      #...
    
      # This must be the last "Location" if you are overloading others, otherwise
      # the others won't load as apache uses the first one listed that matches
      
        ProxyPass balancer://ajpCluster stickysession=JSESSIONID
      
    

提交回复
热议问题