• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help with multiple contexts for a webapp

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been trying to get multiple context names to link to a single webapp (without running multiple copies of the application itself).

I have a deployed webapp running on a Tomcat server. If you go to the URL, it works (which is great). Say the URL is http://support.company.com/webapp. What we are trying to do is to be able to have http://support.company.com/customer1 run the webapp and keep a reference to the custom url (so that all the pages will have support.company.com/customer1/login.jsp etc in the address bar). Total we will have at least a dozen different names pointing at the same web app. Because the application itself is rather memory intensive, we are trying to avoid running multiple copies of the app. Because of decisions from the marketing team, we can't use sub-domains of the company.com name so I haven't investigated using virtual hosts.

I was able to setup the contexts so that they work by adding them to the server.xml file, but I ran into issues with the web app trying to cache itself four times (three contexts, plus the "real" name) which would cause the server to grind to a halt and the catalina.out to throw tons of errors. I have tried to setup context files in /webapps/ and in the Meta-INF folder of the webapp itself, but either the web app would fail to load because of a malformed context file, or in the catalina logs i would see where the entries were being ignored (due to setting a path that is already within the app path).

I am not opposed to putting in the work to setup Apache+Tomcat if necessary. We haven't done so to date because this web server only runs the webapp and nothing else.

Any ideas on how to get this craziness to work?
reply
    Bookmark Topic Watch Topic
  • New Topic