• 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

Path Elements?

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am reading the Sybex study guide, and there's a section that covers Path Elements:
Request URI = contextPath + servletPath + pathInfo
and the following examples were given:
Request path: /games/tictactoe/welcome.html
-Context path = /games
-Servlet path: /tictactoe
-Path info: /welcome.html
Request path: /games/registration/StartServlet
-Context path: /games
-Servlet path: /registration/StartServlet
-Path info: null
Request path: /games/Search/1234?query=Yamaha+R6
-Context path: /games
-Servlet path: /Search
-Path info: /1234
I am wondering if there's an easy way of telling which path is which. For example, in the last example, can it also be Context path: /games/Search, Servlet path=/1234 and Path info=null? How can one tell the servlet path from the path info?
Thanks,
Adrian
 
Paper jam tastes about as you would expect. Try some on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic