This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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!!!
 
Oh. Hi guys! Look at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic