• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

About the serlvet specification

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SRV.11.1
On pt 2, it says that the "... the longest math determines the serlvet selected", what is that means? does it relate to anything in the Deployment descriptor??
also, on SRV.11.2.2
it says if incoming path is "/foo/bar/index.html "... servlet handling request would be "servlet1".... does it mean servlet1 will be run when user request "http://xxxx/foo/bar/index.html"... and if index.html does exist in the system? will index.html be returned?? I am confused, please help.
 
Ernest Lee
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any one?
 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All these mappings you define in deployment descriptor under the element
<servlet-mapping>
<servlet-name></servlet-name>
<url-pattern> /foo/bar/* </url-pattern> <-- pattern checking against url
</servlet-mapping>
1)no its not relative anything in DD. In this Container compares the URL against the url-pattern starting from the "/" and the longest path matching decides the servlet to use
2) if /foo/bar/* mapped to Servlet1 then any url of the form http://mysrever/foor/bar/ANYTHINGHERE will be mapped to Servlet1. even if a physical file "ANYTHINGHERE" presents in that path. Servlet1 may use this for its further processing.
Sridhar
 
Ernest Lee
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thx alot for ur reply!
finally got my question answered!!!
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic