Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

A web application with multiple context name - optimal way?  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a requirement to have an application with URLs like
<hostname>/<a code to identify the country>
for example:
app.company.com/gb
app.company.com/fr
app.company.com/se
etc.

I assumed to use context path targeting to same docbase but doesnt look the optimal way as may hamper the performance. (the urls may go beyond 80)
Even i dont want the multiple loading of the same class. My need is to identify the code (/fr etc) and do some processing for it.

should i go with the apache proxy settings?? its the worst case.

Thanks in advance.
/shailesh
 
Bartender
Posts: 20725
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache proxy or URL rewrite is one way to do it, but if everyone is supposed to be routed to the same webapp, you should consider deploying the webapp under the root context and simply pulling off and using the country code part of the URL as part of the application logic.
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!