Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Use of URL Paths

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Servlet Spec 2.3, the chapter on Mapping Requests to Servlets, first section Use of URL Paths, reads:
"Upon receipt of a client request, the web container determines the web application
to which to forward it. The web application selected must have the the longest
context path that matches the start of the request URL. The matched part of the URL
is the context path when mapping to servlets."
I don't understand the "The web application selected must have the the longest
context path that matches the start of the request URL" bit.
Could somebody explain this a little further, with a couple of examples?
Alan
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for example you have two application on your container firts with context
www.some.com/mycontext
and second
www.some.com/mycontext/mycontext2
so when client calls URL http://www.some.com/mycontext/mycontext2/someServlet
second context will be used and when client calls
http://www.some.com/mycontext/someServlet2
first context will be used
 
Al Pearson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Andriy, that's as clear as crystal.
Alan
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic