This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Path Elements? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Path Elements?" Watch "Path Elements?" New topic
Author

Path Elements?

Adrian Pang
Ranch Hand

Joined: Feb 20, 2004
Posts: 40
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


SCJP 1.4, SCWCD 1.4, SCBCD 1.3
 
GeeCON Prague 2014
 
subject: Path Elements?